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:
00276614
Views:
24
i thought you could only pass arrays using the @ symbol

>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
Bruce Strom

Prayer of St Ephrem:
O Lord and Master of My Life,
Take from me the spirit of sloth, meddling, ambition and vain talk.
But give me a spirit of prudence, humility, patience and love.
Yes Lord and King grant me to see my own sins and faults
and not judge my brother.
For You are Blessed Forever and Ever. Amen.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform