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:16:31
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:
01440265
Vues:
50
Form is too complex an object to be a good candidate for the BO.

In MereMortals BO were based on line, but they share the DS of the caller.

I created a BO class based on session, but I worked with it in a prg. I didn't find it too complex.

>Nadya --
>
>That confirms more or less what I had come across on my own.
>
>I really would not like the kludge of having to handle switching data sessions -- but it wouldn't quite be as you said, would it? You'd actually have to switch to the new data session any time a method in the object was called from outside the object, and then back again when returning, correct?
>
>Actually, I have also considered basing it just on a form (which I would never Show). Is there some conceptual reason to avoid that approach?
>
>Thanks
>
>
>
>>Jim,
>>
>>Unfortunately, it's not an easy problem. The only suggestion I can give you is to initially design your class as custom and then convert to a prg and make changes in a prg since then.
>>
>>There is no other session based class. You can, of course, create a session class in the init of the custom class and switch DS to it and then restore DS in the destroy (and destroy session based class there), but IMHO, it's a bit of a kludge.
>>
>>>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.
>>>
>>>Any suggestions on what I can do?
>>>
>>>Thanks in advance,
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