clear loMyClass=Createobject('myClass') loMyClass.myMethod() define class myClass as custom dimension myArray(1) procedure myArray_assign(vNewVal, m.nIndex1, m.nIndex2) this.myArray[m.nIndex1, m.nIndex2] = transform(m.vNewVal) endfunc procedure myArray_access(m.nIndex1, m.nIndex2) return this.myArray[m.nIndex1, m.nIndex2] endfunc procedure myMethod() local la(4, 2), i, j for i=1 to 4 for j=1 to 2 la[i, j] = 10*i + j next j next i acopy(la, this.myArray) && myArray_Assign not triggered this.myArray[1,2]=25 && myArray_assign correctly triggered for i=1 to 4 for j=1 to 2 ? this.myArray[i, j], Vartype(this.myArray[i, j]) next j next i endfunc enddefineBy the way, if I do not do the
dimension myArray(1)and put your code instead
myArray(1,1) = ''I got an error in the acopy saying that this.myArray is not an array....