Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Understanding public object and Data Session
Message
From
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:
01319426
Views:
16
>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).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform