Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Global scatter name
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00709981
Message ID:
00709999
Vues:
17
>>I need a global object for users throughout my app.
>>Is this an accepted way of doing it?
>>
>>
>>
>>&& Lookup user in table then...
>>public oUser
>>scatter name oUser
>>
>
>That is as good as any. However, I make is a PRIVATE memvar at the beinning of my MAIN prg file. THis still makes the object visible to everything down the call stack. Since everything from MAIN is down the call stack, it's like a PUBLIC memvar.

Is this way better somehow?

>I also just use a global app object based on the custom class. This app object has numerous properties used throught my app, and I also add more props on the fly when I need them for various forms, reports, etc. This object has some generic methods that I also use throughout the app.

This I do already.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform