Anybody can tell my why?Thank you!
Code
----------------------------------------
public class GWTTest implements EntryPoint
{
public void onModuleLoad() {
if(get()==false){
System.out.println(get());
}
}
private native Boolean get()/*-{
return false;
}-*/;
}
Error
-----------------------------------------------------
[ERROR] Unable to load module entry point class com.ts.client.GWTTest
(see associated exception for details)
java.lang.IllegalArgumentException: Something other than a Java object
was returned from JSNI method '@com.ts.client.GWTTest::get()': Cannot
convert to type java.lang.Object from boolean
at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:132)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:233)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.ts.client.GWTTest.get(GWTTest.java)
at com.ts.client.GWTTest.onModuleLoad(GWTTest.java:50)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:326)
at
com.google.gwt.dev.shell.BrowserWidget.attachModuleSpace(BrowserWidget.java:343)
at
com.google.gwt.dev.shell.moz.BrowserWidgetMoz.access$100(BrowserWidgetMoz.java:35)
at
com.google.gwt.dev.shell.moz.BrowserWidgetMoz$ExternalObjectImpl.gwtOnLoad(BrowserWidgetMoz.java:58)
at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native
Method)
at
org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1428)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840)
at
com.google.gwt.dev.SwtHostedModeBase.processEvents(SwtHostedModeBase.java:235)
at
com.google.gwt.dev.HostedModeBase.pumpEventLoop(HostedModeBase.java:558)
at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:405)
at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---