Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing form property by reference
Message
From
10/07/1998 16:33:25
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00116288
Message ID:
00116301
Views:
17
>>What is the syntax for passing a form property by reference?
>>
>>Foo(@THISFORM.prop)
>>
>>gives me an error. I've tried every combo I can think of (@THISFORM..prop, THISFORM.@prop, @(THISFORM.prop), ...). I give up, please tell me the syntax!!
>>
>>Bob
>Bob,
>
>You cannot pass properties by reference. Instead pass the object and the property name as two separate parameters;
>
>Foo(THISFORM,"Prop")
>
>then in foo you can;
>
>
>LPARAMETERS poObj, pcProp
>
>lcValue = EVALUATE("poObj." + pcProp)
>
>* lcValue now contains the value in the property
>
>lcValue = "Bar"
>
>poObj.&pcProp = lcValue
>
>* The property of the bject now contains "Bar"
>
On the other side of this question is: how do you return a property of a form that is an array? I've tried a lot of combinations and can't seem to get this.
Mark Johns
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform