>Hi:
>I need some advice re: passing an array by reference. I have added an array to a form that I am working on that needs to be passed to a function held in a utility object (acolscan from the Hackers Guide) that I've created. The calling routine looks like:
>ThisForm.oBCSUtilities.aColScan(@Thisform.aGroup, cClientGroup, 1)
>VFP errors out telling me that Alias Thisform is not found. What am I doing wrong?
>
>TIA
>Mike
You cannot pass an array property this way.
You can either
- pass the object and let the function called refer to the object.array, or
- copy the object.array to an array var, e.g.
Dimension laPass(ALen(this.aGroup,1), ALen(this.aGroup,2))
ACopy(this.aGroup, laPass)
thisform.oBCSUtilities.aColScan(@laPass, cClientGroup, 1)
Dimension this.aGroup(ALen(laPass,1), ALen(laPass,2))
ACopy(laPass, this.aGroup)
If you use the 2nd approach, the aColScan method can be used from anywhere, just by passing in an array.
Insanity: Doing the same thing over and over and expecting different results.