Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning a value from a class form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00579966
Message ID:
00581614
Vues:
52
>>>>It is very easy to totally eliminate this potential problem forever, simply NEVER USE PUBLIC VARIABLES and this problem will NEVER happen.
>>>
>>>Would the problem still exist if the public variables were RELEASEd properly? Creating a public variable and not releasing it sounds like more of a bad programming practive than using a public variable.
>>
>>Can you point a case where PUBLIC was the only solution?
>
>I can not think of anywhere I use a PUBLIC var. Even my global app object that has to be visible to all objects in my app is scoped as PRIVATE. However, the var is created in my MAIN prg.

Same for me.

To use a PUBLIC variable, you have to declare it explicitly.
Even a lazy programmer who create variable on the fly use PRIVATE as it is the default scope.

:-)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform