Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Referencing a form from a menu - newbie question
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00944466
Message ID:
00944491
Vues:
13
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform