Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
More array passing...
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00276579
Message ID:
00276607
Views:
17
Roi -

I think a couple of the threads that I found on this subject tried to explain what you did below. I couldn't understand what they were saying though. Your explanation makes sense to me and I think I like passing the array that way better than making it public.

Thanks for the very straight-forward explanation!


>Hi Kile,
>
>You can't return an array. You can either make it public like Jeff said or use an object to hold it.
>
>From the method that calls the form.
>
>oParam = newobject('custom')
>oParam.AddProperty('aArray[ 1 ]')
>*...Add some stuff to the array
>Do Form MyForm with oParam
>
>In MyForm add a property called MyParam (you add this on the fly if you want)
>in the init of MyForm, catch the oParam object
>lparameters oPar
>thisform.oParam = oPar
>*....Do stuff to the array
>
>That's it. Since the array is local to the method that calls the form, it will still be there when MyForm has been destroyed. If you change the array in MyForm you are actually changing oParam.
>
>hth
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform