Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Referencing a form from a menu - newbie question
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00944466
Message ID:
00944491
Views:
14
The object reference 'gform' is out of scope.

A quick fix would be to declare the reference to be PUBLIC before DO FORM...

A longer term strategy would be to create a simple forms manager using CreateObject() in the root of your main.prg and using ADDPROPERTY(), add the object references to the forms manager.
DO FORM myForm NAME oFormsManager.oMyForm
would be the syntax.

In the .Destroy() or other suitable event of each form, you can remove the object reference with REMOVEPROPERTY() to avoid dangling a object reference.
Previous
Reply
Map
View

Click here to load this message in the networking platform