Hi.
I have an old problem and I was wondering if somebody has solve this.
In VFP 7.0 sp1, I have a class with an array property :
orcCust.aBrowseFld[5,10]
I want to pass this array to a function (or method) as a referenced parameter like this :
THIS.set_swapCol(THIS.aBrowseFld, 2, lnAcol)
I cant't use @ (@THIS.aBrowseFld) to pass it as reference, I tried
SET UDFPARMS TO REFERENCE
but still pass the first element of the array only. The only solution I find is to dimension a dummy array, copy the original into the dummy array and then pass it to the function as a reference. I have to copy it back to the original.
DIMENSION laBrowseFld[ALEN(THIS.aBrowseFld,1), ALEN(THIS.aBrowseFld,2)]
ACOPY(THIS.aBrowseFld, laBrowseFld)
THIS.set_swapCol(@laBrowseFld, 2, lnAcol)
ACOPY(laBrowseFld, THIS.aBrowseFld)
Too much work for me.
Is it possible to do it with less code ?
Thanks
Nro
I have an old problem and I was wondering if somebody has solve this.
In VFP 7.0 sp1, I have a class with an array property :
orcCust.aBrowseFld[5,10]
I want to pass this array to a function (or method) as a referenced parameter like this :
THIS.set_swapCol(THIS.aBrowseFld, 2, lnAcol)
I cant't use @ (@THIS.aBrowseFld) to pass it as reference, I tried
SET UDFPARMS TO REFERENCE
but still pass the first element of the array only. The only solution I find is to dimension a dummy array, copy the original into the dummy array and then pass it to the function as a reference. I have to copy it back to the original.
DIMENSION laBrowseFld[ALEN(THIS.aBrowseFld,1), ALEN(THIS.aBrowseFld,2)]
ACOPY(THIS.aBrowseFld, laBrowseFld)
THIS.set_swapCol(@laBrowseFld, 2, lnAcol)
ACOPY(laBrowseFld, THIS.aBrowseFld)
Too much work for me.
Is it possible to do it with less code ?
Thanks
Nro