Hello,
I have a class variable that is an associative array
define class (
"class name",
ass_array = associative array ();
meth1 = method({x,y},
for(i = 1, n <= n items(x),i++
xi = x[i];
yi = y[i];
try(
ass_array << insert(xi, Insert(eval list(ass_array[eval(xi)]), eval(yi))),
ass_array << insert(xi, List(eval(yi)))
);
);
);
);
but when I call this class to update the associative array, the array is still empty. Any thoughts?
It is also worth noting that I tested this syntax external to the class to update an associative array and it acted as expected.