Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do we know the 'Current Object' ?
Message
From
19/07/1999 17:48:23
 
 
To
19/07/1999 07:27:57
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00243011
Message ID:
00243330
Views:
26
In addition to what Marcia mentioned remember you can also use THIS.
e.g.

loControl = THIS

Then loControl will maintain reference to the object where loControl was assigned using THIS.





>I'm used to FP 2.6's "sys(18)" telling me all I need to know about the object being edited or whatever.

Confusingly, it also works - some of the time - in vfp.

What are we supposed to used at other times?

The "object.activecontrol.property" syntax seems to me to be far too limited as it requires you to know exactly what 'parent' object is active before you can reference the object you are really interested in. If you're writing a global handling routine which depends on field types, current content etc, you need something like sys(18) to tell you what variable you are currently playing with, regardless of what form or page or grid or listbox or whatever it may be part of...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform