Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine if an object exists
Message
 
To
10/05/1998 06:21:21
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00098172
Message ID:
00098386
Views:
38
>Scatter Name oAnything - has anyone succeeded having this do something useful? I've played with it for a while, hoping to have an object like that to keep me olde values of all the open tables in a form, but I couldn't get this object to belong to a form at all - if it already belongs to a form, it won't scatter; if it doesn't, it becomes a private var to the method which created it, and I sure wouldn't like to make it a public var. With VFP completely lacking object cloning, this object can't be kept at all - trying to copy it to a form's member creates just a referrence to this oAnything, and goes .null. as soon as the method which created it exits.
>
>Has anyone managed to work around this? I have found not a workaround, but a much better solution for my particular case, but in general, I think I may use this Scatter Name somewhere, IF it behaved.


The behaviour you describe is exactly what I would expect it to be. I think they left scatter in only for backward compatibility. If I understand correctly, in VFP you would place your tables or views in the Data Environment and let Buffering handle all the functionality (and more) that we used to get with Scatter and Gather.

If you need to know the old values of all the open tables in a form, you would be interested in checking the methods, OLDVAL() and CURVAL(). Depending on the situation (single vs. multi-user, tables vs. views), these will probably do just what you describe.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform