The problem is that often the window content gets generated from data obtained through and asynchronous call to the server, and therefore the layout is created after the "appear" event is fired. I also tried to call this.center(), after the last line of code generating the GUI, but it seems that this function is run before the widgets on the window finish generating (for some reason which I am not sure of).
I added now a addListenerOnce on the resize event at the end of the function that generates the GUI, and it seems to work fine, but I'm still not sure why simply centering the window after generating the content does not work as expected. The way the window is being created is the following: 1. In the constructor, I place a JSON-RPC asynchronous call to the server to get some information. 2. In the callback of that call, I save the data and call a function called generateGUI, which then applies the layout and adds all necessary widgets, with no asynchronous calls anymore. 3. If I use this.center() after the generateGUI command or from it at the end of it, the window gets centered before it grows to accommodate all the widgets added by generateGUI. -- View this message in context: http://qooxdoo.678.n2.nabble.com/New-window-placement-tp7314259p7314390.html Sent from the qooxdoo mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
