Hi Kenny, Kenneth Tilton wrote: > I listen to "changeSelected" on a Tabview to keep track of who is in > front. Works well except on app start-up, where it appears the initial > "changeSelected" gets kicked off before the selected page's structure > has been finalized. I've just tested a tabView widget with several pages at the playground and I get only one call of the event listener at startup and the rest is working as expected.
> The logging/working listener code is this: > > tabView.addListener("changeSelected", function (e) { > pg = tabView.getSelected(); > console.log("app tabview changesel PAGE " + pg ); > console.log("app tabview pg childs " + pg.getChildren()); > mod = pg.getChildren()[0]; > console.log("app tabview changesel PAGE child" + mod); > console.log("app tabview changesel frontns now: "+ mod.ns); > > frontNS=mod.ns; // the real code > }) If you use the "changeSelected" event you can use --snip-- tabView.addListener("changeSelected", function(e){ var selectedTabViewPage = e.getData(); }); --snip-- the "getData()" method to access the currently selected tabView page instance. cheers, Alex ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel