Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Same table in more than one DE
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00165436
Message ID:
00165574
Views:
10
Mon,

Yes, it is proper OO behavior. The tables are essentially encapsulated to the form object, when the form releases the tables should release also.

If you want other behavior look at other methods. 1) don't AutoClose them or 2) open them at a level higher than form1, 3) don't really release Form1 just Hide() it, 4) possibly rethink the 3 forms and maybe do it all with a single form maybe using 3 pages or tabless pages ala a Wizard-like form.

If you don't have multiinstance forms you could do all this in the default DS.

>One part of my app cycles three forms. Form 1 calls Form 2 then releases itself, and so on. Some of the tables are used in the data environment of all three forms. The problem is when Form 1 calls form 2 then releases itself, it closes all the tables in its DE, including the ones that exist in Form's 2 DE. This causes problems when methods try to access the now closed tables .
>
>Is this correct OOP behaviour, or is there a way for VFP to protect each form's DE (other than leaving all Form 1 tables open by disabling the auto close tables in Form 1 DE.)
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform