Thank you for reporting this bug. We will make it our priority to review this report.
callSuper works in develoment but not in production
callSuper works in develoment but not in production
Ext version tested:
- Ext 5.0.0
- Ext 5.0.1
- Ext 5.0.2.1432
Sencha Cmd version tested:
Steps to reproduce the problem:
Create a default application.- In document root mkdir ext5
- sencha -sdk /path/to/ext generate app Test my/test
- In my/test/app/view create files Good.js
Code:
Ext.define('Test.view.Good', {
method: function () {
console.log('Good');
}
});
and Bad.jsCode:
Ext.define('Test.view.Bad', {
extend : 'Test.view.Good',
method: function () {
console.log('Bad');
// ... logic but with a bug ...
this.callParent();
}
});
- In my/test/overrides create folder view and in it file Bad.js
Code:
Ext.define('Test.overrides.view.Bad', {
override: 'Test.view.Bad',
method: function () {
console.log('Fixed');
// ... logic but with bug fixed ...
this.callSuper();
}
}); - In my/test/app/view/main/MainController.js modify onClickButton
Code:
onClickButton: function () {
Ext.Msg.confirm('Confirm', 'Are you sure?', 'onConfirm', this);
var my = Ext.create('Test.view.Bad');
my.method();
},
- sencha app watch
- sencha app build production
The result that was expected:
Browser pointed to localhost/ext5/my/test/index.html. Click Button. In console Browser pointed to localhost/ext5/my/test/build/production/Test/index.html. Click Button. In consoleThe result that occurs instead:
Browser pointed to localhost/ext5/my/test/index.html. Click Button. In console Browser pointed to localhost/ext5/my/test/build/production/Test/index.html. Click Button. In console
callSuper works in develoment but not in production
Aucun commentaire:
Enregistrer un commentaire