Results 1 to 4 of 4

Thread: 'this.name' won't work from Ext.application ...launch

  1. #1
    Sencha Premium Member
    Join Date
    Aug 2013
    Location
    Australia
    Posts
    308

    Default 'this.name' won't work from Ext.application ...launch

    https://docs.sencha.com/extjs/7.0.0/modern/Ext.html

    Ext.application({
    name: 'MyApp',

    launch: function () {
    Ext.Msg.alert(this.name, 'Ready to go!');
    }
    });


    Ext.Msg.alert(this.name, 'Ready to go!');
    should be
    Ext.Msg.alert(Ext.manifest.name, 'Ready to go!');

    but this does not work on fiddle

    MyApp.getApplication().getName()
    works, but you use the name 'MyApp' to get the application name 'MyApp', which is pointless.

  2. #2
    Sencha Premium User
    Join Date
    Mar 2010
    Location
    Atlanta, GA
    Posts
    55

    Default

    It seems 'this.name' causes a JavaScript error. 'this.getName()' seems to work.


  3. #3
    Sencha Premium Member
    Join Date
    Aug 2013
    Location
    Australia
    Posts
    308

    Default

    Thanks.
    Now Sencha just needs to update the docs (https://docs.sencha.com/extjs/7.0.0/modern/Ext.html).

    I should have looked up
    https://docs.sencha.com/extjs/7.0.0/....html#cfg-name
    It tells me 'name' is a config, not a property.

    'this' is MyApp.getApplication()

  4. #4
    Ext Support Team
    Join Date
    Jan 2018
    Posts
    569

    Default

    Hello,

    Thank you for bringing this to our notice.

    This issue has been registered in our bug tracker under reference number DOCS-603.

    Regards,
    Kumar
    Sencha Support.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •