Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid
Message
 
À
31/12/1999 14:20:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Re: Grid
Divers
Thread ID:
00310213
Message ID:
00311050
Vues:
19
>>So when is a var required to be public?
>
>Only when its real scope is over the entire application.

Incorrect, it is only when its requried scope extends beyond the routine that creates it. A private in the startup program is global to the entire application.

>>It is never necessary to declare a variable public in the main start up prg of an app. A private is globally visible to the entire application.
>
>... I don't understand what you want to say here. Sorry.

I don't know how to say it more clearly.

>Yes, I know that one can have only one public variable that holds every other public variable. I like this approach mainly because it offers flexibility for code maintenance.

Again, incorrect. The variable only needs to be [public because I am allowing teh startup progrma to end. When not in dev mode the variable oApp is private adn can be addressed by everything in the application.

>Still, this doesn't mean it's the only valid/good approach/solution. I've seen applications (not only VFP) that have a limited number of public variables and there's nothing wrong with them as long as there's a good design behind it.

I propose that using publics is a bad design in itslef.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform