-
'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.
-
Sencha Premium User
It seems 'this.name' causes a JavaScript error. 'this.getName()' seems to work.
-
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()
-
Ext Support Team
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
-
Forum Rules