Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Visual Editing of business class w private datasession
Message
 
 
À
22/12/2009 20:53:51
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01440258
Message ID:
01440277
Vues:
42
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform