Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form Manager classes
Message
From
01/10/1998 19:19:08
 
 
To
01/10/1998 16:32:38
Tim Hockin
Illinois State U - Residential Computing
Normal, Illinois, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00142934
Message ID:
00143065
Views:
24
>>>How have any of you implemented form manager classes? or how do you manage forms and form references across scopes?
>>
>>What specific questions do you have?
>
>Just curious as to what functionality might be included, and if there are ways to use it I am missing. I obviously see teh use for it, to cleanly shutdown forms, and to handle references. But I also see how those can be done with _SCREEN.Forms[].
>
>I like to see what other clever ideas people have had. UT has been a source of great ideas for me ;)

You probably have the mechanics of the form referencing laid out... oForms.DoForm('myform')
oForms (or oApp if you want to lump it in with the app object) at the very least holds a reference to every open form, that it has because the form was opened with oForms.Doform(). Basic functionality would include things like ReleaseAllForms, but there are plenty of other things that are nice:
oForms.DoMethod(lcMethod, lcFormName) can be used to directly call any method of any other form without really having an object reference to it. Leaving out the second parameter would run the method in all open forms that have that method (check with PEMSTATUS). oForms.GetForm(lcFormName) can return an object reference to the form whose name you pass. oForms can be responsible for managing a 'Windows' menu that keeps a list of all open forms that the user can select from to bring any form to the top. oForms can have a ActiveControlValid method that finds the last active control on a form and runs its valid method (this is valuable for hen a use clicks on a toolbar and the current control's valid method is never fired, and its value never saved). oForms can be responsible for activating and keeping a reference to toolbars that are form-specific

Keep in mind though, that opening forms through a forms manager can make passing form parameters more complicated. Your forms manager has to be smart enough to know how many parameters were passed to its DoForm method, and which ones to pass on to the form when it is called. Often the use of a parameter object is nice here, and these got easier in VFP 6 with the advent of AddProperty.

Hope this helps get your mind cranking.
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform