Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple Return Values
Message
From
07/12/2001 12:07:02
 
 
To
07/12/2001 10:34:05
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00590869
Message ID:
00591241
Views:
38
>Ed, where can I find out more about parameter object? (Example, how to, when to implement, etc)

Passing in a parameter object:

Create an object in the caller (it could be the caller itself, in which case, it's reference is this or thisform. In the method call pass the object as a parameter:

MyObject.MyMethod(oMyInboundParameterObject

In the method receiving the object, you need an LPARAMETERS statement to take the argument:

LPARAMETERS oInBoundObject

you can reference it in the method as oInBoundObject; if you need it within the container, like a form, outside the scope of the receiving method, save it in a container property to preserve it for the life of the container. Any change made to the inbound parameter object contents will appear in the original object whose reference was passed, regardless of how you access it; objects with a common object reference are the same thing.

Outbound parameter object passing:

Create an object of any kind you like. Save in a variable to keep it local to the method, or to a form property to scope it to the form.

In the Return of the method where you want to pass it back, say:

RETURN oMyParameterObject

That's it - nothing special about parameter objects
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