Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Losing Public Variables When Form Runs
Message
De
19/06/1999 06:41:07
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00231160
Message ID:
00231730
Vues:
16
>>An even more elegant method would be as follows
>>
>>PUBLIC oRecord
>>SCATTER NAME oRecord MEMO
>>
>>Glenn
>
>Glenn,
>
>I hate to disagree, but there is nothing elegant with a public variable. Publics are disasters waiting to happen.

I still don't see much of a difference between using a public variable or something like goApp - even if its public properties are protected and can be changed only by its methods, you can still have some neck of the woods where some tiny bit of code does goApp.Set("DangerousProperty","disaster"), just the same as it could change a value of a public variable. The only advantage I see is that this one is easier to find (well, it was, while we still had the Filer), and the trouble with publics is easier to happen accidentally. I still don't see this as a fullproof method (and foolproof methods don't exist, I know).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform