>From Jim Hunter
> What does your code look like to instantiate and show the
> window? You are doing something wrong as I use modal windows
> all the time and I hide the upper-right corner X and only
> allow them to exit via buttons on my window. So if you are
> not getting response from the objects in your window then you
> are doing something wrong. A code snipit showing the window
> creation and display might give us enough to detect what the issue is.
The window is created by the server, it sends a piece of xml that the
client interprets
_newWindow: function(tag)
{
var result = new webgui.ui.window.Window(this,
tag.getAttribute("id"), tag.getAttribute("caption"));
result.setShowMinimize(false);
this._defaultControl(tag, result);
result.setUserData("update", this._updateWindow);
this._updateWindow(result, tag);
result.open();
return result;
},
_updateWindow: function(window, tag)
{
window.setUserData("disableResize", true);
this._updateControl(window, tag);
window.setCaption(tag.getAttribute("caption"));
window.setTextColor("#"+tag.getAttribute("color"));
//window.setModal(tag.getAttribute("modal") == "True"); no
modal for now 'cause QooxDoo doesn't work that way
window.setFont(this._parseFont(tag));
window.setUserData("left",
parseInt(tag.getAttribute("left")));
window.setUserData("top",
parseInt(tag.getAttribute("top")));
window.setUserData("width",
parseInt(tag.getAttribute("width")));
window.setUserData("height",
parseInt(tag.getAttribute("height")));
window.setMinWidth(parseInt(tag.getAttribute("minWidth")));
if (tag.getAttribute("maxWidth") == "Infinity")
window.setMaxWidth(null);
else
window.setMaxWidth(parseInt(tag.getAttribute("maxWidth")));
window.setMinHeight(parseInt(tag.getAttribute("minHeight")));
if (tag.getAttribute("maxHeight") == "Infinity")
window.setMaxHeight(null);
else
window.setMaxHeight(parseInt(tag.getAttribute("maxHeight")));
//TODO: reenable, this is broken in qx, comboboxes their
lists show below the window
//if (tag.getAttribute("maximized") == "True")
// window.setMode("maximized");
//else
window.setMode(null);
window.setBackgroundColor("#"+tag.getAttribute("backcolor"))
window.setUserData("disableResize", false);
},
_updateControl: function(control, tag)
{
control.setLeft(parseInt(tag.getAttribute("left")));
control.setTop(parseInt(tag.getAttribute("top")));
control.setWidth(parseInt(tag.getAttribute("width")));
control.setHeight(parseInt(tag.getAttribute("height")));
var hint = tag.getAttribute("hint");
if ((hint != null) && (hint != ""))
{
control.setToolTip(new qx.ui.popup.ToolTip(hint));
}
},
// custom window class to be able to send window updates tot he server
qx.Class.define("webgui.ui.window.Window",
{
extend : qx.ui.window.Window,
construct : function(driver, id, vCaption, vIcon, vWindowManager)
{
this.base(arguments, vCaption, vIcon, vWindowManager);
this._driver = driver;
this._id = id;
},
members :
{
// overridden (defined in qx.ui.resizer.MResizable)
// we don't want a separate change event for each dimension
_onmouseup : function(e)
{
this._callInheritedWithDimensionsCheck(arguments, e);
},
// overridden
_maximize : function()
{
this._callInheritedWithDimensionsCheck(arguments);
},
// overridden
_restoreFromMaximized : function()
{
this._callInheritedWithDimensionsCheck(arguments);
},
_callInheritedWithDimensionsCheck : function(args, varags)
{
var left = this.getLeft();
var top = this.getTop();
var width = this.getWidth();
var height = this.getHeight();
// call inherited of the function corresponding to args
this.base(args, varags);
if (this.getLeft() != left || this.getTop() != top ||
this.getWidth() != width || this.getHeight() != height)
{
this._driver._eventWindowResize(this, this._id);
}
},
// overriden to prevent closing
_onclosebuttonclick : function(e)
{
this._driver._eventWindowClose(this, this._id);
}
}
});
>
> Jim
> Hi,
>
> I'm trying to use a modal window in version 0.7.x-svn
> but the effect I get is that I cannot seem to activate any of
> the controls in the window.
> It's impossible to close the window this way.
> Does anybody have a suggestion (or a work around)?
>
> Thanx in advance
> Jeroen
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel