Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Visual Editing of business class w private datasession
Message
From
23/12/2009 10:42:35
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01440258
Message ID:
01440342
Views:
46
>>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform