Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Visual Editing of business class w private datasession
Message
 
 
To
23/12/2009 09:46:10
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:
01440331
Views:
41
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform