I tried to define interface for lightweight collections as blow, but it
can't be compiled successfully. Any mistake here?
//...........................Interface...........................................
@SingleJsoImpl(JsArrayExtImpl.class)
public interface JsArrayExt<M>{
public void add(int addBefore, M model) ;
.....
}
//................................Implementation
public class JsArrayExtImpl<M extends JavaScriptObject> extends
JsArray<M> implements JsArrayExt<M>
{
protected JsArrayExtImpl() { }
@Override
public final native void add(int addBefore, M model) /*-{
this.splice(addBefore, 0, model);
}-*/;
}
but got error:
Exception in thread "Code server for gwttest from Mozilla/5.0 (X11;
Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1
on ...GWTTest.html?gwt.codesvr=127.0.0.1:9997 @ SR;E74|oFVbz;?F%"
java.lang.NullPointerException
at com.google.gwt.dev.shell.ModuleSpace.dispose(ModuleSpace.java:146)
at
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:215)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:525)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
at java.lang.Thread.run(Thread.java:722)`
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.