Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why don't I see cleanup class?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00671062
Message ID:
00671114
Views:
21
>And then I need to remember the name of this class, how to call it, etc. What if somebody wants the class which sets/restores TALK ON instead of OFF? Create another class, or add two methods to SETTALK class (or one method and pass the parameters), remember methods names, etc...

Nope. Create the class to save the current state in a custom property (e.g. cOldSet) in Init() and restore it in Destroy() or thereabouts.

Then you instance the class, it saves current state, you change it in your method/program, to ON|OFF or whatever the case may be.

Upon leaving the method, the state gets restored automagically.


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform