Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Jan 2010
    Posts
    8
    Vote Rating
    0
    amuniz is on a distinguished road

      0  

    Default Application "name" required checking

    Application "name" required checking


    Hello.

    I'm getting this error when creating an Ext.app.Application object using Ext.create:
    Code:
    Ext.app.Application.constructor(): [Ext.app.Application] Name property is required
    This error is shown only when using ext-dev.js or ext-dev-all.js (it's not thrown using ext-all.js or ext-all-debug.js).

    This is my code:

    Code:
    Ext.create('Ext.app.Application', {
        name: 'MyApp',
        appFolder: 'ui/app',
        launch: function() {
            ...
        }
    });
    The name attribute is actually set, so I think this is a bug in Ext.app.Application constructor (only in dev builds):

    Code:
    constructor: function(config) {
        var me = this;
    
        //<debug>
        if (Ext.isEmpty(me.name)) {
            Ext.Error.raise("[Ext.app.Application] Name property is required");
        }
        //</debug>
    
        me.callParent(arguments);
    
        me.doInit(me);
    
        me.initNamespace();
        me.initControllers();
        me.onBeforeLaunch();
          
        me.finishInitControllers();
    }
    The "debug" section is checking the name BEFORE the callParent, so "me" does not have the "config" object applied yet.

    Regards,
    Antonio.

  2. #2
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    5,446
    Vote Rating
    112
    Gary Schlosberg is just really nice Gary Schlosberg is just really nice Gary Schlosberg is just really nice Gary Schlosberg is just really nice Gary Schlosberg is just really nice

      0  

    Default


    Thanks for the report. Can you please post a test case which reproduces the issue? You can use our Fiddle if you like.
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our human resources manager: fabienne.bell@sencha.com

  3. #3
    Sencha User
    Join Date
    Jan 2010
    Posts
    8
    Vote Rating
    0
    amuniz is on a distinguished road

      0  

    Default


    Hello Gary,

    Sure.
    How can I include ext-dev.js in your Fiddle?

    Regards,
    Antonio.

  4. #4
    Sencha - Ext JS Dev Team nohuhu's Avatar
    Join Date
    Jun 2011
    Location
    Redwood coast
    Posts
    255
    Vote Rating
    50
    nohuhu is a jewel in the rough nohuhu is a jewel in the rough nohuhu is a jewel in the rough

      1  

    Default


    @amuniz You're not supposed to create an instance of Ext.app.Application; subclass it and instantiate the derived class instead:
    PHP Code:
    Ext.define('MyApp.Application', {
         
    extend'Ext.app.Application',
        
         
    name'MyApp'
        ...
    });

    Ext.create('MyApp.Application'); // Or just `new MyApp.Application()` 
    Regards,
    Alex.

Thread Participants: 2

Tags for this Thread