Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class based forms and Default DS
Message
From
17/01/2007 15:57:02
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01186390
Message ID:
01186432
Views:
19
This message has been marked as the solution to the initial question of the thread.
>Hi everybody,
>
>Looks like the trick of sharing data session between two forms doesn't work with class based forms.
>
>I set my child form DS to be default and I have this form as a class and call it through menu manager DoForm method. It uses default DS and not the parent form DS as I hoped.

Now I understood what's up. Any object's code runs in the DS in which the object was created. If your menu manager creates your form, and menu manager is in DS 1, then your form's DS will also be 1.

Now you can

1- have DoForm as a .prg (i.e. DS-free) and have it just register your form in the Menu Mgr
2- pass the DS number to the menu manager so it'd change to it before creating your form
3- pass the DS number to the menu manager so it'd change the created form's datasessionID
4- pass the caller form to the menu manager so it'd use its dataSessionID in either of the previous two ways
5- have the caller form do (3) (which is, IIRC, what you're doing now)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform