Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Visual Editing of business class w private datasession
Message
From
22/12/2009 21:15:17
 
 
To
22/12/2009 21:08:03
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:
01440285
Views:
44
Huh?

I'm missing something. Yes, you can set it in the Init.

However, if I've got a bizobject which is always around (say, called gobizobject), based on Custom, doesn't it always just use the datasession in effect whenever it is called? gobizobject.Post(something) .... ???

>>>>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.
>
>The session object can do that in its init, as defined in the member instance (i.e. in the custom-based bizobject's class), so it's not something you have to do over and over.
Jim Nelson
Newbury Park, CA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform