Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing form property by reference
Message
 
To
10/07/1998 18:37:35
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00116288
Message ID:
00116377
Views:
19
>I think I'm understanding things a little better now. I guess the bottom line is that THISFORM.a is not really a variable, although it acts like one in many ways. It's really an object property, and passing it by reference might not be allowable. You probably should have to access properties by going through the object reference. Otherwise, how could you implement accessor methods (GET/SET) for the property if you were allowed to pass a reference to it to some foreign function?
>
>Oh, well, I'm learning.
>
Bob,

Actually THISFORM, THISFORMSET, and THIS are VFP keywords that evaluate to an object reference. THISFORM refers to the current form that the code is in, THISFORMSET refers to the formset that contains the reference, and THIS refers to the object that contains the reference. Also all objects have a parent property that is an object reference to the immediate containar of the object. By using these keywords and the parent property it is possible to write code in objects that has no idea what anythings name is.

For example, you can create an Exit Command Button class with
THISFORM.Release() in it's click event and then drop it on any form and it will work.
Previous
Reply
Map
View

Click here to load this message in the networking platform