My GWT app is throwing this exception:
Caused by: java.lang.ClassCastException: com.google.gwt.core.client.JavaScriptObject$ cannot be cast to java.lang.String
When getting the String response of this function via JSNI:
public final native String data()/*-{
return $wnd.getdata();
}-*/;
}
Here's the Javascript code:
function getdata(){
var data = MyObject.data();
console.log(data);
return data;
}
I'm logging the data output from Firebug and here's the output (to check if the js function is actually returning something):
-0.00030517578125,0.00006103515625,0.00115966796875,0.00146484375,-0.00091552734375,-0.000946044921875,-0.001983642578125,-0.003997802734375,-0.005126953125,-0.00360107421875,-0.0032958984375,-0.004119873046875,-0.00433349609375,-0.0023193359375,-0.0008544921875,-0.003448486328125,-0.00347900390625,-0.0054931640625,-0.0067138671875,-0.005279541015625,-0.006072998046875,