Hi all,,
I'm fairly new to qooxdoo but started to port a Lotus Notes based
application to qooxdoo -. that's fun ;-).
What I have a problem with is to implement a Messagebox which can be
called from anywhere in the application and returns a value based on the
button clicked. The gui work is easy with qooxdoo but the routine calling
my Messagebox function does not "wait" for the returncode.
The Messagebox is based on a qooxdoo window and after calling the open
method the code after the call to Messagebox get's executed
Sample
var rc = myApp.MsgBox('', myApp.tr("Are you sure to delete the selected
user"),4,3,myApp);
if (rc == 6) {
alert("x");
}
else {
alert(rc);
}
above code result in an alert with 'undefned' popping up right before the
messagebox appears
How can I stop execution until user closed the messagebox?
Msgbox function is as follows (fragment)
//*************************************************************************
MsgBox : function(mboxTitle, msg, btnType, iconType, myApp)
//*************************************************************************
{
var btnWidth = 70;
var btnGap = 4;
switch (iconType) {
case 1: //information
iconSource = 'resource/icons/32/dialog-information.png';
break;
...
}
var win = new qx.ui.window.Window(mboxTitle);
win.setLayout(new qx.ui.layout.Canvas);
win.setModal(true);
win.open();
win.center();
var atom = new qx.ui.basic.Atom(msg, iconSource);
atom.setRich(true);
win.add(atom, {top: 5, left: 5, width: '90%'});
switch (btnType) {
case 0: //OK button (default)
var btnOK = new qx.ui.form.Button(this.tr("OK"));
btnOK.setWidth(btnWidth);
win.add(btnOK, {bottom: 5, right: 5});
btnOK.addListener("execute", function(e) {
this.close();
return 1;
}, win);
break;
...
}
..
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel