From: | Steve Tysinger |
To: | Tuvia Vinitsky |
Regarding: " tools\ab\aw\apps are template programs you need to use. "
my vfp9\tools\ab folder has no AW\apps. There is no AW folder under AB.
Thanks, steve
Steve,
You are missing one key concept. In a FiC app, there is a master prg that sets environment variables and tells the webconnect "when the URL is this, open this form". You will not use the code you have in your main for the web, but you could use it for a desktop LAN version.
In tools\ab\aw\apps are template programs you need to use. You can download from the FiC website a pdf with a walk-through of this.
As to the FAA errors, in a web application there is no "read events". Read events tells VFP to sit and wait for somethjing to happen - the web works that way by default.
Okay, I created myself a basic project. It has one form based on VFP's native form base class and a main program
In the main program I have;
SETPATHto'forms' additiveDOFORM'form1'setPATHTOONSHUTDOWNcleareventsREADeventsONSHUTDOWN
The adaption assistant returns 3 issues. I know this is probably very basic to you guys, but I am not understanding the issue explanations. Can you please help...
The issues are listed below...
1. SET PATH to 'forms' additive
2. DO FORM 'form1'
3. Set Path To
1&3 state;
This instruction should be located in an 'application setup' program or class, shared by LAN and WEB execution stacks, such as xxxSets that FAA creates during phase "3-publish"
2 states;
This instruction calls a form outside of a form member method.
If this form call executes in a procedure or function called by a form member method (then the called form is a child of calling form), add a new parameter for a form reference, say 'toForm', and call form by the following instruction:
[choice = ] toForm.wForm(<form>, [<callBack method>][, t01,...,t20])
'choice' is the variable where you store user's choice returned by a modal form ("TO choice" clause of DO FORM); use this variable as long as you have not implemented a call-back method for user's choice processing (see details hereafter).
wForm() parameters:
- <form>: form name WITH EXTENSION; extension is necessary for FoxInCloud server to distinguish from a class name
- callBack method:
. modeless form : any empty (e.g. .F., '', etc.) or .NULL. value
. modal form discarding user response: .T.
. modal form with user response expected: '<name of the call back method to process user's choice>': e.g. wFormCallBack? that calling object inherits from <Home(1)>\Tools\AB\aw.vcx, or absolute or relative address of target method on another object of same form; call-back method must belong to a member of the calling form.
implement this call-back method by moving code located just after form call, which should process user's choice, to this call-back method
- t01,...,t20 : parameters for form.init() if any
If conversely this instruction executes a top-level form, probably from a .mnx/mpr menu or main program, replace it by a top-level form page display by calling the wFormStandardPage() method from your Process class (xxxProcess); see also how to build a menu with xxxMenu.xls.