title: Why not call methods of a class
body: <p>I have got a TabContainer class. This class is a extend of Ext.tab.Panel.
  The create works fine, but, when i try send a message to instance Firebug says:</p>
  
  <blockquote>
    <p>"TypeError: tbbar.canAddTab is not a function"</p>
  </blockquote>
  
  <p>The class is:</p>
  
  <pre><code>Ext.define('KMA.view.environment.TabContainer',{
      extend: 'Ext.tab.Panel',
      alias: 'widget.environmenttabcontainer',
  
      initComponent: function(){
          [...]
          this.callParent(arguments);
      },
      createTab: function(aTitle,aToolTip,anItem){
          return {
              title: aTitle,
              itemId: aTitle + "Tag",
              tabconfig: {
                  title: aTitle,
                  tooltip: aToolTip,
                  items: anItem
              }    
          };
      },
      openTabs: function(){
          return this.getItems().length;
      },
      maxOpenTabs: function(){
          return 7;
      },
      canAddTab: function(){
          return (this.openTabs() &lt; this.maxOpenTabs());
      },
      addTab: function(aTabCfg){
          this.add(aTabCfg);
      }
  });
  </code></pre>
  
  <p>My example code is:</p>
  
  <pre><code>var tbbar = Ext.ComponentQuery.query('environmenttabcontainer');
  console.log(tbbar);
  console.log(tbbar.canAddTab());
  </code></pre>
  
  <p>In the first "console.log" Firebugs show the instance of TabContainer, and show the methods of the class. But, why not work ?. Any idea ?</p>