Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Public Variables or Object Properties
Message
De
24/05/2001 13:15:27
 
 
À
24/05/2001 13:06:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00510878
Message ID:
00511053
Vues:
27
>>Craig
>>
>>>An excellent practice. You should also declare you application object as PRIVATE in your MAIN.PRG.
>>
>>Why should I use private? at the moment I have it as a Public.
>>
>>Kev
>
>The main reason I can think of is this:
>If you ever need to call one app from another app and they're both built on the same framework, they will probably have the same variable name for the application (e.g., Codebook uses goApp), the 2nd app will stomp on the first app's variable if it's Public.
>If it's Private, it won't.

I think that's it.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform