Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Evan,
Here's my take on this, and of course a cheezy work-around. When you issue "Do ... with thisform.formproperty" the formproperty is passed by VALUE. When you pass an array by value, only the first element of the array gets copied and handed in; therefore the receiving parameter REALLY ISN'T AN ARRAY, but it's rather a SINGLE-VALUED-VARIABLE containing a COPY of the array's first element. You can verify this by putting a suspend after the parameters statement and take a peak at the parameter's value in the watch window. That's why you get the not an array error message (Foxpro's weak data typing is a a blessing as well as a liability).
You cannot use "set udfparams to reference" to override this behavior, nor does the @ sysmbol help when making the call in this way.
My Solution: make a copy of the array and pass the copy in by REFERENCE.
=acopy(thisform.aSearchFields, aMyTempArray)
DO FORM FIND WITH "device", aMyTempArray TO lnid
We're trading some memory for neatness of code, but it works.
Steve-O
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