Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Visual Editing of business class w private datasession
Message
De
22/12/2009 21:10:05
 
 
À
22/12/2009 20:53:51
Dragan Nedeljkovich
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:
01440281
Vues:
38
Dragan --

You say:

Your custom can't be a session, but it can have a session

I understand (sort of) adding an object, based on Session, to the Custom object. This Session object has its own class.

OK, but -- for any method in bizobject which is public, won't I have to, on entry, save the calling datasession, set the datasession to match the new session, and then, on exit, reverse the process?



>>Howdy, all --
>>
>>I have just begun a more concerted effort to incorporate business classes into my apps (yes, I know, its very long overdue).
>>
>>I already had about a dozen or so classes in my various apps that were created in PRGs and defined as Session. This allowed them to have private datasessions (which, actually, was the only reason I created them in the first place).
>>
>>I find the editing capabilities in a PRG kind of cumbersome -- I'd like to be able to save a class in a VCX and use a tool more familiar to me, PEM Editor. This would provide a few niceties not available in PRG-based classes -- opening each method in a separate class, for instance, or seeing parent code.
>>
>>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.
Jim Nelson
Newbury Park, CA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform