Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing Thisform.aMyArray by reference
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00261669
Message ID:
00261672
Views:
20
>How do I pass an array that is defined as a property on a form by reference? The following:
>
>Thisform.ChangeArray(@Thisform.aMyArray)
>
>Gives error:
>
>Alias 'Thisform' is not found.
>
>Am I sentenced to perform ACOPY before and after the call to Thisform.ChangeArray?
>
>--Paul

Paul,

You either need to ACOPY() to a regular array or pass a reference to teh fomr itself to the routine and then manipulate the array property.

Example, form with array property named aArray calls another object's ethod like this;
* Somewhere in formA
DO FORM FormB WITH Thisform
In formB you can;
* FormB Init
LPARAMETERS poForm
Thisform.oForm = poForm && oForm is a custom property
Then anywhere in FromB that you choose you can;
Thisform.oForm.aArray(1,1) = "ABC"
and you are manipulating the array property of FormA.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform