Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dangling reference
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00663016
Message ID:
00663138
Views:
31
>Hi Nadya,
>
>>I found, that if form has a private DS and in the life of the form we add some object to the screen, the Form's datasession remains open after form is closed...
>
>That's because an object belongs to the datasession it has been created in. As long as the object lives, the datasession won't go away. After a long time I finally found a work around to that problem. Execute the command that adds the object to _SCREEN with _VFP.DoCmd(). This function always operates in the default datasession and therefore all objects created with this function also operate in the default datasession:
>
>_VFP.DoCmd("_SCREEN.AddObject([SomeClass])")
>
>Christof

Sounds like a better solution to the original problem. Thanks a lot. I guess, this should be documented. Do you want to make a FAQ?
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform