1. #1
    Sencha User
    Join Date
    Mar 2011
    Posts
    105
    Vote Rating
    67
    fdp is a jewel in the rough fdp is a jewel in the rough fdp is a jewel in the rough fdp is a jewel in the rough

      0  

    Default Bug in sencha compile for Ext application controllers

    Bug in sencha compile for Ext application controllers


    I found a bug with Sencha Cmd v3.0.0.250

    with this app.js
    Code:
    Ext.application({
      name: 'MyApp',
      controllers: [
        'Login'
      ],
      views: [
        'MyApp.view.Viewport'
      ],
      launch: function() {
        // ...
      }
    });
    The file app/controller/Login.js is not added to all-classes.js

    with this fix:

    with this app.js
    Code:
    Ext.application({
      name: 'MyApp',
      requires: [
        'MyApp.controller.Login'
      ],
      controllers: [
        'Login'
      ],
      views: [
        'MyApp.view.Viewport'
      ],
      launch: function() {
        // ...
      }
    });
    The file is added to all-classes.js

    My cmd is:
    Code:
    sencha compile page --strip-comments --input-file login.html --output-page build/login.html

  2. #2
    Sencha User Stormseeker's Avatar
    Join Date
    Jan 2010
    Location
    Evanston, Illinois
    Posts
    55
    Vote Rating
    1
    Stormseeker is on a distinguished road

      0  

    Default


    This is happening to me too. It seems like Sencha Cmd is ignoring the controllers property in the Ext.application and the only way I can get it to work is to list all the controllers as required.

    I am using the regular 'sencha ant testing build' or 'sencha app build' and the results are the same. All the files seem to be created correctly but when I load it up, it looks for the controller as they weren't included in the all-classes.js.

  3. #3
    Sencha User
    Join Date
    Dec 2010
    Posts
    10
    Vote Rating
    0
    kishore_r is on a distinguished road

      0  

    Default


    I am facing the exact same issue. I did get the all-classes.js to include the controllers by doing a

    Ext.require('MyApp.controller.*');

    in my app.js. But I still get a bunch of 404's for the Controller and View classes even though the all-classes.js has them included.

    Any ideas on how to get past this issue?

    Thanks in advance

  4. #4
    Sencha User mberrie's Avatar
    Join Date
    Feb 2011
    Location
    Bangkok, Thailand
    Posts
    506
    Vote Rating
    14
    mberrie will become famous soon enough mberrie will become famous soon enough

      0  

    Default


    AFAIK Sencha Cmd has support for detecting implicit dependencies such as these controller classes. Maybe a bug?

    If you need to hint a dependency to the compiler, you can also use

    //@require app.controller.MyController

  5. #5