Hi Josh,

 

(comments below prefixed with DAN>)

 

trying to initialize an array using something like this

Offset = new int[]{A,B,C}

where A, B, C have already been set in the interpreter instance. I seem to be able to eval the above statement fine, but I can't seem to find a way to get the array back out from the interpreter - get() only returns Objects, not arrays.

DAN> arrays are Objects.  Just cast the result to an array like so:
int[] offset = (int[])interp.get(“offset”);

Also, when I try to get Offset[0], it returns null, even though I know A has been set to a value.

DAN> primitive arrays cannot contain nulls so I expect the problem lies elsewhere.  If you send your code to the list we can take a look.

Is there something I'm missing?  Can beanshell not do this yet?

DAN> I don’t think this is a BeanShell issue, but send your code to the list and we will take a look.