title: Private functions and Variables ExtJs4?
body: <p>In my current project I am using ExtJs3.3.<br>
  I have created many classes which had private variables and functions. For eg:  </p>
  
  <pre><code>MyPanel = function(config){
    config = config || {};
  
    var bar = 'bar';//private variable
  
    function getBar(){//public function
       return bar;
    }
  
    function foo(){
       //private function
    }
  
  Ext.apply(config, {
    title: 'Panel',
    layout: 'border',
    id: 'myPanel',
    closable: 'true',
    items: []
  });
  
    MyPanel.superclass.constructor.call(this, config);
  };
  Ext.extend(MyPanel , Ext.Panel, {
    bar: getBar
  });
  Ext.reg('MyPanel', MyPanel);
  </code></pre>
  
  <p>I understand that the new way of doing things in ExtJs4 is to use the <code>Ext.define</code> method. So as my above piece of code would look something like this:</p>
  
  <pre><code>Ext.define('MyPanel', {
    extend: 'Ext.panel.Panel',
  
    title: 'Panel',
    layout: 'border',
    closable: true,
  
    constructor: function(config) {
  
       this.callParent(arguments);
    },
  
  });
  </code></pre>
  
  <p>So what I want to know is how can I define private variables and functions in ExtJs4 similar to the way I done it in ExtJs3?<br>
  In other words I understand that  the <code>Ext.define</code> method will take care of defining, extending and registering my new class, but where should I declare javascript <code>var</code>'s which are not properties of the class itself but are needed by the class.</p>
  
  <pre><code>MyPanel = function(config){
    //In my Ext3.3 examples I was able to declare any javascript functions and vars here.
    //In what way should I accomplish this in ExtJs4.
  
    var store = new Ext.data.Store();
  
    function foo(){
    }
    MyPanel.superclass.constructor.call(this, config);
  };
  </code></pre>