>Hi Edward
>I put
>set datasession to (_screen.activeform.datsessionid)
>in the method and it works, but I still do not understand why I should do that. Does each datasession has it's own set of public variables ? Or does each object have a property linking to the datasession it was created in ?
>TIA,
>Alex.
There is no explicit relations between object scoping and datasession. If you put some code in object method then VFP will fire it and apply to current datasession, i.e. it's your responsibility to set datasession appropriate to your code purpose.
The only implicit connection between object and datasession is Controlsource property, because it will trigger some internal code accessing data. Again, any external (you own written) code should explicitly assume in what datasession you are now.
Edward Pikman
Independent Consultant