Hi, I've got the following code in my Application.js and the problem is, on app load, pressing "focus" returns me "null" with the window being modal. When I switch the window to non-modal, I always get the textfield as the focused widget. Now, after first time with the window still a modal, I get the button as the focused widget. Note that I've set a 1000ms delay and visually the text field has the focus, still the button is said to have the focus. Any ideas on why?
> main : function() { > // Call super class > this.base(arguments); > > // Enable logging in debug variant > if (qx.core.Variant.isSet("qx.debug", "on")) { > // support native logging capabilities, e.g. Firebug for > Firefox > qx.log.appender.Native; > // support additional cross-browser console. Press F7 to > toggle visibility > qx.log.appender.Console; > } > > var layout = new qx.ui.layout.VBox; > layout.setSpacing(10); > var child_container = new qx.ui.window.Window(); > child_container.setHeight(300); > child_container.setWidth(300); > child_container.setModal(true); > //var child_container = new testproject.OPWindow(); > child_container.setLayout(layout); > > //this.getRoot().add(child_container); > child_container.open(); > var bt1 = new qx.ui.form.Button("Focus"); > var modality = "Toggle modality"; > var bt2 = new qx.ui.form.Button(modality + > (child_container.isModal()? "(Modal)": "(Not Modal)")); > var field = new qx.ui.form.TextField(); > child_container.add(bt1); > child_container.add(bt2); > child_container.add(field); > bt1.addListener("execute",function(){ > field.focus();setTimeout(function(){ > var fw = > qx.ui.core.FocusHandler.getInstance().getFocusedWidget(); > alert("Focused widget is:" + fw); > field.setValue(fw); > },1000); > },this); > bt2.addListener("execute",function(){ > child_container.setModal((child_container.isModal()? false: > true)); > bt2.setLabel(modality + (child_container.isModal()? > "(Modal)": "(Not Modal)")); > },this); > > > }, cheers, skar. -- -- The life so short, the craft so long to learn. ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel