Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Visual Editing of business class w private datasession
Message
De
23/12/2009 10:42:35
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:
01440342
Vues:
45
>>>I create a Session object ( say it has datasession 5). I then call a method of the session object which creates an custom object and returns it.
>>>The returned object will have datasession 5
>>
>>IOW, it's a factory which is a session. My problem was that I had a global factory which would always create objects in DS 1 (so all of their code would run there and DS switching was often necessary) - so instead I had to create a factory in each DS. Your solution attacks the problem from the opposite direction. I like that - both the factory and datasession need to be created early on, to create other objects or at least the environment for them, so why not make them one class. Nice :).
>
>In the factory pattern do you release the object that manages the factory before child objects are released?

Irrelevant. The factory doesn't store any references to objects it creates, it only returns them and forgets.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform