Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing object ref to forms and back?
Message
From
17/10/2000 01:45:33
 
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00430169
Message ID:
00430178
Views:
14
>I've seen this discussed here before, should have paid more attention. I need to return multiple values back from a (modal) form and want to use the "create an object, pass it to the form, populate it with the values, and pass it back" idea to get the values. However, it isn't working for me. I have an object created and try to send it to a form parameter like in the following code, but I just get errors, upon errors...
>
>oP = CREATEOBJECT('myparams')
>DO myform WITH oP ...
>
>First question is how to call the form, like above with a "TO" clause? If so, "TO" what? Another object variable? I've tried to create a form property (oHold) to hold the object reference, populate it's properties with the values I need before the form unload and do a "RETURN oHold" but no luck. Anyone care to shed some light on this?!

No need to return anything - DO passes by reference, and IAC, since the object reference is passed, any changes made to the passed reference will change the content of the object passed.

>
>Thanks
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