A wierd bug appeared in my application :
com.google.gwt.dev.shell.HostedModeException: Something other than an int
was returned from JSNI method
'@com.google.gwt.user.client.Timer::createTimeout(Lcom/google/gwt/user/client/Timer;I)':
JS value of type JavaScript object(13), expected int at
com.google.gwt.dev.shell.JsValueGlue.getIntRange(JsValueGlue.java:266) at
com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:144) at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeInt(ModuleSpace.java:247)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeInt(JavaScriptHost.java:75)
at com.google.gwt.user.client.Timer.createTimeout(Timer.java) at
com.google.gwt.user.client.Timer.schedule(Timer.java:110)
at rates.client.Rates$1.onFlashMessage(Rates.java:94)
And here is my code, it fails on the method schedule :
eventBus = new SimpleEventBus(); final Label flashPanel = new Label();
flashPanel.addStyleName("topMessage"); flashPanel.setVisible(false);
RootPanel.get("flash").add(flashPanel);
eventBus.addHandler(FlashMessageEvent.TYPE, new FlashMessageEvent.Handler()
{ @Override public void onFlashMessage(final FlashMessageEvent event) {
flashPanel.setText(event.getMessage()); flashPanel.setVisible(true);
flashPanel.addStyleName(event.getStatus()); Window.scrollTo(0, 0); new
Timer() { @Override public void run() { flashPanel.setVisible(false);
flashPanel.removeStyleName(event.getStatus()); //
flashMessage.removeFromParent(); } }.schedule(10000); // Line 94 } });
--
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.