title: Ext-JS 4 dynamically creating controllers - code not working
body: <p>Can you tell me why this gets me</p>
  
  <blockquote>
    <p>Cannot call <strong>substring</strong> of undefined.
    Cannot call method <strong>getModel</strong> of undefined.</p>
  </blockquote>
  
  <pre><code>Ext.require(                   
      ['MyApp.controller.Country', 'MyApp.controller.CountryProperties'],     // this auto-loads all dependencies 
      function(){ 
              // ... as soon as this class 
              //    and all its dependencies have loaded...
          var controller = Ext.create('MyApp.controller.Country');  // create an instance
          var controller2 = Ext.create('MyApp.controller.CountryPropeties');  // create an instance
          controller.init();                  // launch init() method
          controller2.init();
      }
  );
  </code></pre>
  
  <p>But when I add those controllers, views, stores and models manually in app.js into controllers: [], views: [] etc. it works.</p>
  
  <p>Btw. I have inside controller -> stores:[], views: [] so when I load only a controller, it should load any dependencies for controller.</p>
  
  <p>Why I get that error?</p>
  
  <p>Thank you. :)</p>