OptionDialog is getting an error

When I use the Dialog with the following code I get an error message when I click on any of the buttons. Does anyone know how to fix this?

Thank You

Peter

Here’s the code:

final OptionDialog dlg1 = new OptionDialog ( TPTApplication.getCurrentApplication () );
dlg1.showConfirmationDialog ( “Hello”, “That’s a deal. Agree ?”, new OptionDialog.OptionDialogResultListener () {
public void dialogClosed ( OptionKind closeEvent )
{

		  CensusApplication.getCurrentApplication().getMainWindow ().showNotification ( "The deal was " + closeEvent.name ());
	  }
	});

this is the error message:

com.vaadin.event.ListenerMethod$MethodException
Cause: java.lang.RuntimeException: Invalid option dialog state or buttons: com.vaadin.ui.Window.removeWindow(Lcom/vaadin/ui/Window;)V
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:162)
at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1166)
at com.vaadin.ui.Button.fireClick(Button.java:380)
at com.vaadin.ui.Button.changeVariables(Button.java:196)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1297)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1217)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:733)
at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:483)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: Invalid option dialog state or buttons: com.vaadin.ui.Window.removeWindow(Lcom/vaadin/ui/Window;)V
at eu.livotov.tpt.gui.dialogs.OptionDialog.finihDialog(OptionDialog.java:207)
at eu.livotov.tpt.gui.dialogs.OptionDialog.buttonClick(OptionDialog.java:191)
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.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:490)
… 22 more

Looks like you’re not the only one having this issue:

http://code.google.com/p/tpt/issues/detail?id=13

Thank You

There was one little change in 6.5.x that turned out to be binary incompatible even though it is source compatible: the return type of Window.removeWindow() changed from void to boolean. As far as I know, this has affected two or three add-ons in the directory so far. Recompiling the add-on helps - either by the author or by you compiling it from the (open) sources.

Technical details: If you call a method that returns a value but don’t do anything with the value, Java compilers silently generate bytecode that drops the extra value from the stack. If the return type changes from void to some other type or vice versa, the compiled code is not compatible with other code compiled against the other version.

That did it!

Thank You!