I understand you raise several questions in a single post.
Some hints, maybe disordered ...
1- your startup.prg will be shared between LAN and Web versions of your application; please check out xxxServer.prg and how-to guide for more details on how to do that.
you'll need to isolate the LAN part of your startup (e.g. READ EVENTS, _Screen.Icon, etc.) into, say, LANstartup.prg calling startup.prg up front2- Menu system needs be rebuilt, see xxxServer.prg and xxxMenu.xls for more details - there is no callback from a menu
3- form.unload() and form.destroy are never executed in Web mode so CLEAR EVENTS, usually in these methods, is not executed either
4- Calling a modal child form from within a standalone procedure is not supported for now; Here is an excerpt from current road map:
version: 1.20
target: 30/06/12
benefit: Support extension
modules: "awPublic.prg
aw.vcx!awFrm"
description: Call awPublic.prg!wForm() to launch a child form from a standalone procedure or function, or a method of an object that is not a member of a form, and called by a method from a form member object, or of the form itself.
Called child form may be modal.
Call-back method address must relate to the form or control where latest user event occurred.
The following are not supported in Web mode:
- Standalone procedure/functions and/or methods of objects that are _not a member_ of a form as call back method to process user's choice from a modal child form,
- Modal child form returning a user choice and not launched in the context of a user event.
Hi
I'm new to FiC so please bear with me if this sounds like a dumb question.
I'm hoping to migrate/convert an old app of mine that started life in the 90's in Clipper, and has gone through Foxpro for Windows and all the versions of VFP to 9. With each new version some of the new features have been included, but a lot of the old code has stayed. I have a startup prg which handles opening of all the tables and setup of the environment before calling a modal form, which is where most users work. When this form exits the system menu is displayed and a READ EVENTS gets called. Eventually the exit from the menu will do a CLEAR EVENTS and the system closes tables and ends. In addition to all the forms and child forms there is a large prg which is a grab-bag of procedures and functions and class definitions which can be called from anywhere. Theses functions can also call child forms or put up a modeless progress box or ask questions via messageboxes or other dedicated forms.
I've just read the how-to guide on Form Calls and Call-Backs which I think I understand when you're running from an existing form or calling your first top-level form. But how does it work in my case? Say, I'm in a method on a child form which then calls one of my "library" procedures which then cascades down a few levels, and now I need to display a form, (DO FORM... ) I'm not a top-level form and I'm also not on the child form so how do I implement the call back, I havent got an object reference to the calling form several levels higher up. Should I create a new form in code, CREATEOBJECT('wForm'...), and then use the callback methods on that? Or what?
Also, does the DO Menu.mpr + READ EVENT structure still work or are there callbacks needed for the menu.
Many Thanks in advance
Malcolm
BTW: thanks for the update to the roadmap
-- thn (FoxInCloud)