-
Sencha User
Location of where the widget is added seems to affect the production build
Ext.define('apam.view.Main', {
extend : 'Ext.Panel',
xtype : 'mainpanel',
config : {
fullscreen : false,
layout : 'hbox',
padding : 40,
items : [ Ext.create('Ext.Button', {
flex : 1,
text : 'Button',
listeners : {
tap : function() {
alert('ehl');
}
}
}) ]
},
log: function (msg) {
console.log('apam.view.Main '+msg);
},
constructor: function (config) {
this.log('constructor');
config = config || {};
Ext.apply(this.initialConfig, config);
Ext.apply(this, config);
// this.button = Ext.create('Ext.Button', {
// flex : 1,
// text : 'Button',
// listeners : {
// tap : function() {
// alert('ehl');
// }
// }
// });
//apam.view.Main.superclass.constructor.apply(this, arguments);
this.callParent(config);
//this.add(this.button);
}
});
Above script does not fire event when it is part of merged script.
However the script in comment #18 continues to work in merged (production/testing) mode.
this.callParent should be same as apam.view.Main.superclass.constructor.apply(this, arguments)
The difference that seems to matter is how the button is added.
In above script button is added at config.items whereas in comment #18 the button is added in constructor.
-
Show again source code.
One thought: if you create a new application using the sdk tools, things are working fine or not?
-
Sencha User
Source code is in comment #14, #15, #16, #17, #18
The app was generated using the tool and I am concatanating it using the sencha app build tool..
As I said, it works as long as the initialization of button is within constructor. This has resulted in some work, however I've got the prototype working again..
-
I am 99.99% sure you are massing things with overrides.
I saw your previous code, I wanted to know how it looks after you used the right way on overrides this.callParent( arguments );
The other question / advice was to create a new application to see if it works ok when you are not corrupting things around
-
Sencha User
point out things incorrect in the source code
I tried this.callParent(arguments) and it did not help.
Can you please point out things that seem incorrect to you in the simplified code that I included in previous comments?
-
Did you create a new application just for testing?
Tags for this Thread
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