Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Private datasession issues..
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00153491
Message ID:
00153886
Views:
24
Michiel,

What I have found useful is to instantiate the customobject as a property of the form. This way it seemlessly inherits the datasession.

The command is : thisform.de= createobject(thisform.cDE)

'De' being the reference to the custom object and cDE being the name of the object.

The command is issued in the load method. You also need to 'uninstanciate' the customobject:

thisform.de= .null.

hth,

Marc





>hi David,
>
>>If that method were a method of your form class then it would work in both private DS and default DS forms. That's the way I handle SETs that are scoped to the DS. If you look at the HELP DATASESSION topic it shows the SETs that have DS scope.
>
>
>That's correct. IF it were a method from my form class. But we use an CustomObject where we put all our methods. And if we call a method which containts SET commands from our customobject via a private datasession form when the SET commands won't work in that private datasession form.
>
>Somebody suggested to change the current datasession from the Custom object to that of the private datasession. This worked fine. But we don't know when the form is released in WHICH datasession the customobject is. Did it go back to the global datasession or??
>
>Do you know?

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Previous
Reply
Map
View

Click here to load this message in the networking platform