Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Understanding public object and Data Session
Message
 
 
To
25/05/2008 15:34:43
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01319198
Message ID:
01319452
Views:
22
>>So you are saying that if the base of the class was SESSION I wouldn't have to worry about calling methods of this class/object from any procedure (even private DS form)?
>>
>>UPDATE. Even after changing the base class from CUSTOM to SESSION, the methods of the class seem to be working in private DS.
>
>All the rules still apply - unless you create it as a session class with its own datasession (.datasession=2). It is so, by default in VFP9 - not quite sure for the previous versions. You can still have a session class with .datasession=1 (meaning "use default DS", which is not the default value of this property) (yes, it's clear to me too :).
>
>The difference here is that a session class will create its own session - which is usually its purpose, you want to isolate a process and the tables it uses, you make it run within a session class, or in a form with a private DS. If you create an object of any other class (not session, not form, not formset), it will be created and its code will run in the creator's DS (and the other rules will apply as per the Wiki page).

Thank you, Dragan.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform