Hi, I have to say that I am amazed of the work that has gone into this project.
So, I have created a class that does RPC's with a server.
I have created a interface (event) that should trigger at a callback. The callback returns a arraylist of objects that I need to use in java-script.
I have @Export 'ed my class that does the callback, and @ExportClosure 'ed my interface class.
Looking into the Getting Started guide (
https://code.google.com/p/gwt-exporter/wiki/GettingStarted), everything seems to be working.
My javascript looks something like this : var callbackClass = new package.CallbackClass("arg1","arg2");
pncma.getTimeInfo("arg1",function(s){
alert(s);
});
Output :
Alert box with : [package.TimeClass, package.TimeClass]
So, the variable "s" is a arraylist of my classes, thats perfect!
But If I try this:var callbackClass = new package.CallbackClass("arg1","arg2");
pncma.getTimeInfo("arg1",function(s){
console.debug(s.length());
});
Output:
com.google.gwt.core.client.JavaScriptException: (null) @package.Interface_ExporterImpl::invoke_getTimeInfoEvent(Lcom/google/gwt/core/client/JavaScriptObject;Ljava/util/ArrayList;)([JavaScript object(104), Java object: java.util.ArrayList@1129678442]): null
It does not matter how i treat my "s"-variable inside my function paramtere, I will get this error no matter what. The only thing that is working right now is alerting the variable.
I have also exported the Time object that it is showing me that I get returned from the interface.
Help is much appreciated!
Regards