Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating form variables
Message
De
02/01/2001 12:25:49
 
 
À
02/01/2001 09:02:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00458327
Message ID:
00458515
Vues:
23
You cannot access a variable defined in a form or class from outside of that form or class, except if the variable was defined as PUBLIC. If you want to access this variable from outside, you have to define it as a property of the form/class or you have to create a method that will return it's value.
>1. When I click on the command button in the first form called from a program by 'do form form1 name 0123', I can access the properties by either o123.nameofproperty or thisform.nameofproperty.
>
>2. When I click on the command button in the second form which was called by the first form with 'do form form2 name o124' I cannot read the properties by using 0124.nameofproperty, but only thisform.nameofproperty. However, I can still use o123.nameofproperty to access the properties of the first form
>
>Why does being out of scope affect the second form and not the first form. I thought using 'do form xxx name oYYYY' allowed one to manipulate the form properties as a memory variable anywhere. It appears it does for the first form but not the second form.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform