Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing Thisform.aMyArray by reference
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00261669
Message ID:
00261672
Vues:
19
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform