title: Attaching multiple views to a controller in ExtJS 4 MVC
body: <p>This is using the standard ExtJS 4 MVC library and structure.</p>
  
  <p>I am trying to attach multiple views to a single controller so I can create instances of them later to add to panels. Unfortunately I am getting errors about the view when I add the second one and ExtJS is blocking the syntax errors it appears so that I am unable to see where the issue is.</p>
  
  <p>If I comment out ViewOrders from the list below it works fine, but if it is in there then I get the following error:</p>
  
  <pre><code>An uncaught error was raised with the following data: ext-all-debug-with-comments.js (line 7864)
  msg:
  "The following classes are not declared even if their files have been loaded:   'PVAL_App.view.ViewOrders'. Please check the source code of their corresponding files for possible typos: 'app/view/ViewOrders.js'"
  
  sourceClass: "Ext.Loader"
  sourceMethod: "onFileLoaded"
  </code></pre>
  
  <p>Here is my controller:</p>
  
  <pre><code>Ext.define('PVAL_App.controller.Viewport', {
      extend: 'Ext.app.Controller',
  
      views: [
        'Viewport', 'ViewOrders'
      ],
  
      init: function() {
        console.log('Viewport controller init()');
      }
  });
  </code></pre>
  
  <p>Here is my ViewOrders view:</p>
  
  <pre><code>Ext.define('PVAL_APP.view.ViewOrder', {
  
      /* Begin Definitions */
      extend: 'Ext.panel.Panel',
      alias: 'widget.ViewOrders',
  
      requires: [
          'Ext.panel.Panel',
          'Ext.data.ArrayStore'
      ],
  
      border:false,
      layout: 'fit',
      //autoScroll: true,
  
      initComponent: function() {
      }
  });
  </code></pre>
  
  <p>I doubt this is needed but this is my application file:</p>
  
  <pre><code>Ext.Loader.setConfig(
  {
    enabled: true
  });
  Ext.application({
    name: 'PVAL_App',
  
    appFolder: 'app',
  
    autoCreateViewport: true,
  
    controllers: [
      'PVAL_App', 'Viewport'
    ],
  
    launch:function() {
      // Nothing yet.
      //console.log(this.controllers);
    }
  });
  </code></pre>
  
  <p>I cannot seem to figure out if it is a syntax error or if this is an issue with the framework. I have experienced close to the same issue if I try to link to another controller from within one which makes me believe that this might be a constraint of the framework.</p>