Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Visual Editing of business class w private datasession
Message
 
 
À
23/12/2009 09:46:10
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:
01440331
Vues:
40
>>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?
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