Basically, I think just the following would need to be added to add support for double[] arrays:
In DataClass.java:
and in JSOHelper.java
In DataClass.java:
Code:
public double[] getAttributeAsDoubleArray(String property) { return JSOHelper.getAttributeAsDoubleArray(jsObj, property); } public static void setAttribute(JavaScriptObject elem, String attr, double[] values) { setAttribute(elem, attr, JSOHelper.convertToJavaScriptArray(values)); }
Code:
public static JavaScriptObject convertToJavaScriptArray(double[] array) { if(array == null) return null; JavaScriptObject jsArray = createJavaScriptArray(); for (int i = 0; i < array.length; i++) { JSOHelper.setArrayValue(jsArray, i, array[i]); } return jsArray; }
Comment