Hi, As i see it you have Application.js and Toolbar.js. You have declared the tabview in Application.js and you want its reference accessible in Toolbar.js . what I would do, is to add a property to the Toolbar.js, say tabView, and then, when i instantiate Toolbar class in Application.js i will do: toolbar.setTabView(myTabView);
cheers, Gabi ________________________________________ From: georg [[email protected]] Sent: Tuesday, November 09, 2010 5:16 PM To: [email protected] Subject: [qooxdoo-devel] access a tabview Hello, i have an tabview, in the tabview a toolbar. I open the dialogwindow with the tollbar button and will create an table and add it under the toolbar in the tabview. The tabview ist created in the Application class. How can i access the tabview to add an table? Toolbar.js: var window = new moto.NeueTabelle(); newTableButton.addListener("execute", function(e) { //alert("Hello World!"); // this.window = new moto.NeueTabelle(); this.fireEvent("newTable"); alert("createWindow"); window.createWindow(); }); window.addListener("data", function(ev) { alert("data"); // var tabView = new moto.Tabview().getTabView(); --->>???? var pages = this.getRoot().tabView.getChildren(); this.debug("MainWindow Data"); var data = ev.getData(); alert(data.name + " " + data.date); //table = new moto.MainTable("false",data.date); var column = []; column.push("Name"); var rowData = []; rowData.push(["Inhalt"]); var tableModel1 = new qx.ui.table.model.Simple(); tableModel1.setColumns(column); tableModel1.setData(rowData); table = new qx.ui.table.Table(tableModel1,"Tabelle"); alert(pages[0]); pages[0].add(table); },this); NeueTabelle.js: var btn2 = new qx.ui.form.Button("Tabelle anlegen", "icon/16/apps/office-calendar.png"); btn2.addListener("execute", function() { var data = { name : checkName.getValue(), date : datefield.getValue() }; win.close(); this.fireDataEvent("data", data); },this); -- View this message in context: http://qooxdoo.678.n2.nabble.com/access-a-tabview-tp5721268p5721268.html Sent from the qooxdoo mailing list archive at Nabble.com. ------------------------------------------------------------------------------ The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel ------------------------------------------------------------------------------ The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
