‘I have a base classe, where is declared two listeners:
Ext.define('App.controls.CoWindow', {
extend: 'Ext.window.Window',
listeners: {
show: {
fn: function(win, opt){
alert('opened from base class');
},
scope: this
},
close: {
fn: function() {
alert('closed from base class');
}
}
}
})
If I declare a new class extending this, and configure the listener, the ancestor events are not called:
var procura = Ext.create('App.controls.CoWindowEx', {
listeners: {
close: {
fn:function() {
alert('closed from extending class');
}
}
}
});
I get only “closed from extending class”, when I need the two messages.
Because you’re overwriting the listeners config on the superclass prototype. If you must do it that way: