Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using _screen as app object/to hold global objects
Message
De
29/02/2000 17:28:29
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Using _screen as app object/to hold global objects
Divers
Thread ID:
00339445
Message ID:
00339445
Vues:
49
I had one of those "brilliant" ideas that occasionally get me into a great deal of trouble. The thought occurred to me that instead of creating a global application object, and a global variable to point to it, I could simply add properties (and objects) to the already existing global _screen object. As long as accessed it with the _screen.x syntax, it would not matter whether it got renamed or not.

Could this get me into trouble. Does the _screen object exist in all VFP applications, including COM objects?

Also to my twisted brain code that does this is easier to follow than code using some global pointer. But I want my code not only to be easy for me to read, but easy for other people to read. Does this sound easier or harder to follow than creating a standard application object with a global object variable pointing to it?

I admit I like the idea of getting rid of the last global variable in my code. But I don't want to created a twisted hard to follow mess to accomplish this.

Thanks

Gar
Thanks

Gar W. Lipow
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform