Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Local vs private
Message
De
10/08/2005 17:32:06
 
 
À
10/08/2005 11:59:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01039725
Message ID:
01040015
Vues:
24
I find this idea to be interesting. goApp would be a custom class created in your main class library.
PRIVATE goApp
goApp = createobject('goAppclass')
goApp.userauthorization = 9
and the value of goApp.userauthorization would be visible from anywhere in the application?
Is that right?


>I don't use any PUBLIC variables. In my Main.prg, I create a PRIVATE var, goApp that is my application object. Anything that needs scope in the entire application is put there as a property, method call, child object, etc.
>
>>Thanks Tom -
>>I only use public variables in 2 instances. The first is when I want a value to be seen by the entire application such as a security value that is referenced by all the controls on all the forms. The second is when I want to pass a value to a report, such as a variable report title, since I haven't found another way to do that. Any thoughts?
>>- Don
>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform