Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using _screen as app object/to hold global objects
Message
From
29/02/2000 17:28:29
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Using _screen as app object/to hold global objects
Miscellaneous
Thread ID:
00339445
Message ID:
00339445
Views:
48
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
Next
Reply
Map
View

Click here to load this message in the networking platform