Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning multiple values from a form
Message
 
To
16/06/2000 09:30:27
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00381069
Message ID:
00475286
Views:
29
>>What is the your preferred method to return more than one value from a form? Use an array? or pass a reference to a non-visual object? Or some other way?
>
>Roi and Ken both gave good suggestions, but if I wanted to make this as simple as possible for myself and for other programmers, I would accept output parameters
passed by reference.
>
>For an example, check out the GridHitTest() method. That returns a value, plus 4 values gained by passing variables by reference.
>
>Mike,
>If I understand you correctly, this is the method I wanted to use, but have been unsuccessful implementing.
> The problem I run into is: how do you maintain the by reference integrity of a variable passed by reference after the called form's init event?
>
>I know you can save an object reference to a property, but what about a variable passed by reference? How do you prevent it from going out of scope?
>
> For Example,
>
>DO FORM form2 with @form1
>
>in form2.init() event
>
> lparameters toForm
> this.cusproperty = toForm
>
>now I can access form1 from anywhere in form2 thru the .cusproperty. But how do I do this with a variable passed by ref? Because when I pass a var by ref and assign the parameter to the property in the form's init event, the property only takes on the value, not the reference.
>
>Thanks In Advance,
>
>Jon

Jon,

I know this thread happend quite a while ago but did you ever get a final answer, if so could you pass it on to me as this is exactly the point I've got to!!

Thanks in advance.

Jeremy
Caroline
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform