SteveDingle
Programmer
Heya All,
Having brain fart and/or going mad. I have a method which passes and array by reference to another method which populates the array. Psuedo code:
This type of stuff has worked for me for years. Now I'm up against a situation where the above breaks. Basically MyArray comes back as MyArray[1,1] as if nothing happened. I have traced it and the taMyArray is getting populated correctly its just when control is returned to the initial method.
The gosh darn mind numbing problem for me is that the deciding factor of whether it works or not depends on the "calling chain". IOW, the only difference I can find when this fails depends on how a method, 3 calls up the calling chain, receives an object reference.
FWIW, I know there are other way to do this, like using Collection object but this is old code and I don't want to have refactor tons of other code to deal with collections... just now
Thanks for any and all insight
Toodles,
Steve Dingle
D&S Business Solutions Ltd
Having brain fart and/or going mad. I have a method which passes and array by reference to another method which populates the array. Psuedo code:
Code:
LOCAL ARRAY MyArray[1,1]
This.PopulateArray( @MyArray )
...process array
* PopulateArray
LPARAMETERS taMyArray
DIMENSION taMyArray[2,4]
...blah...blah
This type of stuff has worked for me for years. Now I'm up against a situation where the above breaks. Basically MyArray comes back as MyArray[1,1] as if nothing happened. I have traced it and the taMyArray is getting populated correctly its just when control is returned to the initial method.
The gosh darn mind numbing problem for me is that the deciding factor of whether it works or not depends on the "calling chain". IOW, the only difference I can find when this fails depends on how a method, 3 calls up the calling chain, receives an object reference.
FWIW, I know there are other way to do this, like using Collection object but this is old code and I don't want to have refactor tons of other code to deal with collections... just now
Thanks for any and all insight
Toodles,
Steve Dingle
D&S Business Solutions Ltd