Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Property Arrays: Cannot pass by reference!!!
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00005499
Message ID:
00005523
Vues:
36
>Is it me, or does VFP not allow one to pass a property array by reference? Example:
>
>Class definition:
> Define Class myClass as Custom
> Dimension AnArray(1)
> EndDefine
>
>Instantiation:
> oMyObj=CreateObj("myClass")
> * Assume that oMyObj.AnArray is redimensioned and filled in with something useful.
>
>Later:
> Do AnyProcedure with oMyObj.AnArray
>
>In this situation, I have found there is no way to get VFP to pass the array by reference. Instead, it simply passes the fist element of the array. Set UDFParms and using "@" has no effect (in fact, you cannot use the "@" symbol when trying to pass an object reference).
>
>This is really a nuisance because the receiving routine doesn't give a darn if the array is attached to an object variable or not. It simply wants an array by reference!
>
>Is there a workaround? Thanks!

Do you try
=AnyProcedure(@oMyObj.AnArray)

I think that VFP let you did some thing like this

hope this help
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform