Information générale
Catégorie:
Codage, syntaxe et commandes
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement