Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Losing Public Variables When Form Runs
Message
 
À
19/06/1999 06:41:07
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00231160
Message ID:
00232065
Vues:
22
>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).

Hi Dragan - You can reduce "publics" down to one (and I call that one 'global' to make it more aesthtetic :). Using a top-level, launched with a NAME in the main PRG, there are no other variables at all, no 'goApp' is needed. Everything else is done in the top level and children as custom pems...So only the NAME parameter is truly global for the entire app...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform