Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Methodology question
Message
From
10/01/2001 15:41:59
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00461641
Message ID:
00461908
Views:
12
> Actually, I want that both forms share the same settings. Both
> forms are non-modal, as far as I recall. In the main form, which is
> based on BaseForm class, I put this line in Init: set exact off, because
> I want it behave this way. The second form should also use SET EXACT OFF
> and not change it.

Agreed.

> If, hovewer, we add code in wgForm.Load event, which would deal with
> settings and I don't want to place any code in wgForm.Load, I'm in
> trouble... The simplest solution, from my POV, would be provide a
> check via Form.Property, does this code need to be executed or not.

If I understand you correctly, this property determines whether it is
your SetSessionGenericSettings and/or SetSessionSpecializedSettings method
that is run. If this is the case, then I agree that this form property is
a good idea. However, I doubt it will always be sufficient if both forms
are modeless. The forms may require different settings but the settings
cannot change after both formns are loaded. If the user switches back and
forth between the forms to do some actions, then it is possible that one
action will fail because the setting is not "correct" as far as the form
is concerned (regardless of your value property). Checking your property
value and running the appropriate method(s) in the Activate/Deactivate
events may be a solution to your problem but it may fail if a form calls
the other form's methods. Dragan's solution to add code to save/restore
the settings in the affected methods should resolve this issue.

This is not a trivial problem...

Daniel
Previous
Reply
Map
View

Click here to load this message in the networking platform