' 2 つのリスナーが宣言されている基本クラスがあります。
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');
}
}
}
})
これを拡張する新しいクラスを宣言し、リスナーを構成すると、祖先イベントは呼び出されません。
var procura = Ext.create('App.controls.CoWindowEx', {
listeners: {
close: {
fn:function() {
alert('closed from extending class');
}
}
}
});
2 つのメッセージが必要な場合にのみ、「クラスの拡張からクローズ」されます。