Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SETting Environment
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00457247
Message ID:
00458027
Views:
22
>Nadya,
>
>Thanks so much for the info. I will use your syntax. It works great. The reason I'm using a public variable is because I have 3 separate PRGs. One is Main.prg which calls Setup.prg then starts the event loop READ EVENTS. After the event loop I have a call to my Cleanup.prg. Not sure if there's any advantage to having 3 separate prgs instead of just one called MAIN.PRG. I read this in Booth's "Visual Foxpro Unleashed". What do you think? See any problems with having the 3, or should I be all in 1 for that program.
>
>Thanks again.

Elgin,

I'm not an expert here. I've read this in Booth's book too and basically I don't see any problems with this approach. Actually, in the main program I would instantiate an object, say, goApp (variable goApp would be public). I would save all environment settings as properties of this object and in object destroy method I would restore them back. In our own framework, though, we don't care about restoring settings back. IOW, our main program set some global environment settings the way, it has to be, our forms use private DS, and if any of the program has to change something, it saves the current state in local variable, then restores it back at the end. The main program doesn't do it at the end, which annoyes me a little. For instance, our main program set exact on, which is not always convenient...

Anyway, this is just an idea, and hopefully somebody else would jump here and correct me, if I'm not quite right...
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform