Dear Rick,
excuse me but I have problems to configure.1)
I moved project from c:\wconnect to c:\myapp
I changed GeneratedSourceFile property into web pages
I customized wwProcess and wwBusiness classes as mywwProgress.prg and mywwBusiness.prg
I modified wconnect_override.h file:
#UNDEFINE WWC_WWBUSINESS
#DEFINE WWC_WWBUSINESS mywwBusiness
#UNDEFINE WWC_WWPROCESS
#DEFINE WWC_WWPROCESS mywwProcess
<
>I modified Main.prg (OnLoad):
SET PROCEDURE TO Source\mybusiness.prg ADDITIVE
SET PROCEDURE TO Source\myprocess.prg ADDITIVE
<
> However I have error because the application runs the original wwBusiness class, instead of mywwBusiness one.
Please what is wrong?
2)
When I move a project from wconnect folder, do I have to move also wconnect.h and wconnect_override.h files?
And if I cannot move wconnect.h and wconnect_override.h files from wconnect folder, how to live together 2 different projects with different wconnect_override.h files in wconnect folder?
Thank you very much again
Just sublcass wwBusiness and then use that as your base class for whatever business objects you create. Don't change wwBusiness.
+++ Rick ---
Dear Rick,
I would like, for example, to change Opend method of wwBusiness class, so what I have to do?
I UNDEFINE and DEFINE into WCONNECT_OVERRIDE.H file.
Do I write the new Open method in MyAppProcess.prg?
Open method is only a part of the wwBusiness class, so must I write the full wwBusiness class code in MyAppProcess as MyBusiness class?
Thank you very much for patience.
You should never modify the base classes as they WILL get overwritten in updates. Whenever possible subclass any Web COnnection classes and they use those sub-classes instead. Most Web Connection classes are defined in WCONNECT.h as #DEFINE statements. For example:
#DEFINE WWC_RESPONSE wwResponse
#DEFINE WWC_RESPONSEFILE wwResponseFile
#DEFINE WWC_RESPONSESTRING wwResponseStringNoBuffer
#DEFINE WWC_RESPONSEASP wwASPResponse
To change any of those classes create your subclass and then add the following into WCONNECT_OVERRIDE.H:
#UNDEFINE WWC_REQUEST
#DEFINE WWC_REQUEST myRequest
#UNDEFINE WWC_WWPDF
#DEFINE WWC_WWPDF wwXFRX
Then if you need to explicitly instantiate these classes use:
loPdf = CREATEOBJECT([WWC_WWPDF])
The #DEFINEs are important because they are used internally in Web Connection to instantiate objects used inside of the frameowrk where you can control the object creation. In MOST (but not all) places Web Connection uses the above syntax to create objects.
+++ Rick ---
Dear Rick,
by developing my new application sometime I have to customize original Classes: I comment original code, then I write my customized code.
However I fear that future upgrades could overwrite original Classes and so I could lose my customizations.
Please is there any better way to customize?
Thank you very much again for your great software and for your precious support!