I have a ModalWindow class which I extend to make various other modal
windows. This class extends the Window class and overrides open() and
close() to block and unblock events to the root window. Basically like this:
var DEPTH = 0;
qx.Class.define("timeclocktest.ModalWindow",
{
extend : qx.ui.window.Window,
construct : function()
{
this.base(arguments); // make the window
// make the window modal and centered
//
this.set({showClose:false, showMinimize:false, showMaximize:false,
movable:true, resizable:false});
this.addListener("resize", function(e) {this.center();}, this);
// adjust some settings on the window's caption bar (title)
//
this.getChildControl("title").set({padding:7, font:new
qx.bom.Font().set({family:["Lucida Grande", "sans-serif"], size:20,
bold:true})});
},
members :
{
open : function() // add this window to the root, block events
to the root and open the window
{
if (DEPTH++ == 0)
{
this.getApplicationRoot().add(this);
this.getApplicationRoot().set({blockerColor:"black",
blockerOpacity:0.5});
this.getApplicationRoot().block();
}
this.base(arguments);
},
close : function() // close the window and if it's the
{
this.base(arguments);
if (--DEPTH <= 0)
{
this.getApplicationRoot().unblock();
this.getApplicationRoot().focus();
}
}
}
});
In my application I base other modal windows on this class by extending it.
This works fine but I notice that if I open one of these modal windows and
click outside of it, that is on the root window, I get an error
'widgetTarget is null' from line 171 of EventHandler.js (version 0.8.2).
Is there something I need to do to the root window
(qx.application.Standalone) to keep this from happening?
Thanks in advance,
Larry Blische
--
View this message in context:
http://www.nabble.com/%22widgetTarget-is-null%22-error-tp24942843p24942843.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel