Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Visual Editing of business class w private datasession
Message
 
 
To
22/12/2009 20:53:51
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01440258
Message ID:
01440277
Views:
43
>>However, one thing stumps me. I can't create a class based on Session in a VCX, and a class based on Custom does not have a private datasession.
>>
>>To make this a little clearer: I'm looking for a way to create a business object, stored in a VCX, so that it has a private datasession.
>
>Your custom can't be a session, but it can have a session. Just add a session object to your base custom bizobject, and then you can set the properties of that session any way you like. As it's an object added at the top class level, it will instantiate before any other object you add at younger levels ("younger" as in "subclassed"). Caveat: if at some level below you add anything that has MemberClass set, the base methods of the member class will execute first - check thread #1421954.

You can create a session based object to your class, but then you still have to do set datasession to mySessionObject.DataSession. I see no better way around it.
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