Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class based forms and Default DS
Message
 
 
To
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:
01186458
Views:
17
Re-writting DoForm as a separate procedure with a call to DoForm method from the Form Manager solved the DS problem. Now there are several other issues I have to work on.

>>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)
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