o.k. thanks. 
How get i the tabView properties in the same class.
I try it with " var doc = this.getTabView(); " in the getTableToolbar
function (see below -->).
But an error appears:
this.getTabView is not a function
I need it to add an table in the tabview

regards,
Georg


qx.Class.define("moto.Toolbar",
{
  extend : qx.ui.toolbar.ToolBar,
  
properties:
{
tabView : {init: ""}

},
   
  /*
 
*****************************************************************************
     MEMBERS
 
*****************************************************************************
  */

  members :
  {
    /**
     * This method contains the initial application code and gets called 
     * during startup of the application
     * 
     * @lint ignoreDeprecated(alert)
     */
     
    
    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;
      }

      /*
     
-------------------------------------------------------------------------
        Below is your actual application code...
     
-------------------------------------------------------------------------
      */

  
    },
       getTableToolbar : function()
    {
      var toolbar = new qx.ui.toolbar.ToolBar();
      // New Table button
      var newTableButton = new qx.ui.toolbar.Button("Neue Tabelle");
      toolbar.add(newTableButton);
      toolbar.add(new qx.ui.toolbar.Separator());
      // Load Table button
      var openTableButton = new qx.ui.toolbar.Button("Tabelle öffnen");
      toolbar.add(openTableButton);
      toolbar.add(new qx.ui.toolbar.Separator());
      // Save Table Button
      var saveTableButton = new qx.ui.toolbar.Button("Tabelle speichern");
      toolbar.add(saveTableButton);
      toolbar.add(new qx.ui.toolbar.Separator());
       // Delete Table Button
      var deleteTableButton = new qx.ui.toolbar.Button("Tabelle löschen");
      toolbar.add(deleteTableButton);
      // Add event listener
     
        var window = new moto.NeueTabelle();
        
      newTableButton.addListener("execute", function(e) {
      //var data = e.getData();
        //alert("Hello World!");
       // this.window = new moto.NeueTabelle();
      //  this.fireDataEvent("data1",data);
        
        //alert("createWindow");
        window.createWindow();
        
        
      },this); 
       saveTableButton.addListener("execute", function(ev) {
      
      var data = ev.getData();
      this.fireDataEvent("data1",data);
     /* this.debug("MainWindow Data");
     //this.fireDataEvent("data",data);
      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");
      this.add(table, {row: 1, column: 0});*/
      //alert(pages);
      //pages[0].add(table);
      
      },this);
    //**********************************************************  
      window.addListener("data", function(ev) {
      
  --->    var doc = this.getTabView();
      var data = ev.getData();
      
      this.debug("MainWindow Data");
    
      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");
      doc[0].add(table, {row: 1, column: 0});
      //alert(pages);
      //pages[0].add(table);
      
      });
      
   
      openTableButton.addListener("execute", function(e) {
        alert("Hello World!");
        
      }); 
      saveTableButton.addListener("execute", function(e) {
        alert("Hello World!");
      }); 
      deleteTableButton.addListener("execute", function(e) {
        alert("Hello World!");
      }); 
      
      
      return toolbar;
    }
  }
});
-- 
View this message in context: 
http://qooxdoo.678.n2.nabble.com/access-a-tabview-tp5721268p5724473.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

Reply via email to