Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing a property by reference???
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00546079
Message ID:
00546093
Views:
22
>Hi,
> Does anything one know how to pass a property of an object by reference?
>Something like
>
>oObj = CREATEOBJECT("Custom")
>oObj.AddProperty("Prop1", "")
>oSomeFunction = CREATEOBJECT("SomeFunction")
>oSomeFunction.Function1(@oObj.Prop1)

It's not possible to pass an object property by reference; if you need to pass it by reference, you either must pass the object reference itself and then manipulate the member using the passed object reference, or copy the value of thye property to a memvar and pass the memvar by reference, and copy the memvar's content back to the property on return.

Even the use of DO to invoke the function with UDFPARMS set to REFERENCE passes the object property by value.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform