Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SET DELETED ON and SQL Select
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01456091
Message ID:
01456258
Views:
38
>>>But that wasn't what I meant. I don't think altering settings in a form's Load is a good idea, at least not without saving and resetting the old value. Doesn't really belong in a form method, either, more like the app level.
>>
>>Form's Load (or DE BeforeOpenTables) is the place to set data session specific settings. So, in our BaseForm class we have all the sets command (or it could be a separate class with all the settings, which you instantiate). This way it will restore the defaults when form is closed, though may be unnecessary for forms using private DS.
>
>What can I say? I don't agree. IMO those kind of settings are at the app level, not the form level. Both work, of course, it's just a question of style and approach.

Mike,

There are two kinds of settings: global settings and private DS settings. There is no way to set private form DS settings from the application object, since application object is instantiated in the default Data Session. Therefore all these settings are repeated in the Form's Load.

You can have a special class called Settings. You can instantiate this class from App object and from the Form's Load - this way the common settings are the same in the default DS and in form's private DS.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform