Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing a property by reference?
Message
From
12/03/1999 17:27:14
Jonathan Cochran
Alion Science and Technology
Maryland, United States
 
 
To
12/03/1999 11:55:47
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00196859
Message ID:
00197035
Views:
58
So, modifying oForm.propertyX in the program will actually modify propertyX, but if you pass oForm.propertyX itself to a program and modify the parameter, propertyX isn't actually modified, just the parameter variable. I wonder if this is by design?

Thanks for your response,
Jonathan

>>Can a property (such as a form property) be passed by reference to a .PRG (DO xyz WITH Thisform.rc_Property)? It looks as though it can't be done directly (it can be, by saving the property to a variable, passing the variable, then saving the variable back to the property).
>>
>>Thanks,
>>Jonathan Cochran
>
>You may just send the object reference:
>DO ... WITH Thisform
>and in prg:
>LPARAMETER oForm
>=messagebox(oForm.propertyX)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform