PDA

View Full Version : Desktop.removeWindow problem



Reghin
7 Aug 2009, 11:01 AM
Hi!

I'm getting this (below) exception when I try to remove a window from the desktop (instance of ). The exception raises when I do this:



addWindowListener(new WindowListener() {
@Override
public void windowDeactivate(WindowEvent we) {
super.windowDeactivate(we);
DesktopManager.getInstance().getDesktop().removeWindow(we.getWindow());
}
});




[ERROR] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (TypeError): Object doesn't support this property or method
number: -2146827850
description: Object doesn't support this property or method
at com.google.gwt.dom.client.Node$.removeChild$(Native Method)
at com.extjs.gxt.desktop.client.TasksButtonsPanel.removeButton(TaskBar.java:296)
at com.extjs.gxt.desktop.client.TaskBar.removeTaskButton(TaskBar.java:92)
at com.extjs.gxt.desktop.client.Desktop.onHide(Desktop.java:232)
at com.extjs.gxt.desktop.client.Desktop$2.windowHide(Desktop.java:208)
at com.extjs.gxt.ui.client.event.WindowListener.handleEvent(WindowListener.java:23)
at com.extjs.gxt.ui.client.event.WindowListener.handleEvent(WindowListener.java:1)
at com.extjs.gxt.ui.client.event.BaseObservable.callListener(BaseObservable.java:176)
at com.extjs.gxt.ui.client.event.BaseObservable.fireEvent(BaseObservable.java:96)
at com.extjs.gxt.ui.client.widget.Component.fireEvent(Component.java:444)
at com.extjs.gxt.ui.client.widget.Window.hide(Window.java:381)
at com.extjs.gxt.ui.client.widget.Window.hide(Window.java:353)
at com.extjs.gxt.ui.client.widget.Window$6.handleEvent(Window.java:989)
at com.extjs.gxt.ui.client.widget.Window$6.handleEvent(Window.java:1)
at com.extjs.gxt.ui.client.event.BaseObservable.callListener(BaseObservable.java:176)
at com.extjs.gxt.ui.client.event.BaseObservable.fireEvent(BaseObservable.java:96)
at com.extjs.gxt.ui.client.widget.Component.fireEvent(Component.java:444)
at com.extjs.gxt.ui.client.widget.button.IconButton.onClick(IconButton.java:147)
at com.extjs.gxt.ui.client.widget.button.IconButton.onComponentEvent(IconButton.java:123)
at com.extjs.gxt.ui.client.widget.Component.onBrowserEvent(Component.java:760)
at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1320)
at com.google.gwt.user.client.DOM.dispatchEventAndCatch(DOM.java:1299)
at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1262)


The DesktopManager is a singleton I created to have the same Desktop() instance from anywhere in the application.

What I'm trying to do is to "destroy" or "free" the window's resources once it's closed (deactivated), so the GC could reclaim it's memory.

Using: GWT 1.7, GXT 2.0.1, Eclipse Galileo, hosted mode.

Many thanks in advance!

Roger.

sven
8 Aug 2009, 6:03 AM
Fixed in SVN

Reghin
10 Aug 2009, 10:44 AM
How do I get it from the SVN???

Arno.Nyhm
11 Aug 2009, 12:10 AM
- you can wait for the next minor release (i read somewhere 2.0.2 is in the pipeline)
- for SVN access (readonly) you need a support subscription (see http://extjs.com/store/gxt/#support-table )

Reghin
11 Aug 2009, 5:25 AM
Thanks!!!! :D