title: Extjs: problem in Ext.reg()
body: <p>I got the following error with Extjs 4:</p>
  
  <blockquote>
    <p><strong>Uncaught TypeError: Object #&lt;Object> has no method 'reg'</strong></p>
  </blockquote>
  
  <p>I add the .js file which contains following code.</p>
  
  <pre><code>var myStore = new Ext.data.JsonStore({
      id:'ms',
      totalProperty:'totalCount',
      root:'rows',
      url:'http://localhost:8080/ezDI/myservlet',
      fields:[
              {name:'un'},
              {name:'pwd'}]
  });
  
  Ext.ns('Example');
   // example grid
  Example.Grid = Ext.extend(Ext.grid.GridPanel, {
      initComponent:function() {
          var config = {
              store:myStore,
              columns:[{
                  //id:'ms',
                  header:"UserName",
                  width:40, sortable:true,
                  dataIndex:'un'
              },{
                  header:"PassWord",
                  width:20,
                  sortable:true,
                  dataIndex:'pwd'
              }],
              viewConfig:{forceFit:true},
              loadMask:true
          }; // eo config object
  
          // apply config
          Ext.apply(this, Ext.apply(this.initialConfig, config));
  
          // call parent
          Example.Grid.superclass.initComponent.apply(this, arguments);
  
          // load the store at the latest possible moment
          this.on({
              afterlayout:{scope:this, single:true, fn:function() {
                  this.store.load({params:{start:0, limit:30}});
              }}
          });
  
      } // eo function initComponent
  
  });
  
  Ext.reg('examplegrid', Example.Grid);
  </code></pre>