And since I'm on a roll and can't seem to help myself:
/**
* Adds a "clean-up handler" to destroy window after it is closed. Note
* use this function with awareness that it will destroy the window after
* all listeners to the window's "close" event have been called such that
* the window should no longer be used.
*
* @param win {qx.ui.window.Window} Window to destroy after it is closed
*/
destroyWindowOnClose: function(win) {
function cleanUp() {
// Setup a timer routine to call immediately. Using a timer
routine
// will guarantee that the current thread of processing will
complete
// before this function is called.
qx.util.TimerManager.getInstance().start(
function() {
win.destroy();
win = null;
}
);
}
win.addListener("close", cleanUp, win);
}
It might even be useful to have "destroyOnClose" and option for the window
class. This method will also ensure any other listeners to the "close"
event will get called before the window is destroyed.
I'm making the assumption here that "close" is the last event the window
will fire...?
-----
"The wise know their weakness too well to assume infallibility; and he who
knows most, knows best how little he knows." - Thomas Jefferson
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/Programmatically-closing-Window-while-contained-tooltip-open-causes-problems-tp6518756p6527617.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel