我是javascript的新手,有些头疼。我注意到事件处理函数中的“this”对象不是主类,如下所示:
Ext.define('App.controls.VerticalMenu', {
extend: 'Ext.panel.Panel',
setMenu: function(item) {
"this" here, is a "VerticalMenu"
var theBtn = Ext.create('App.controls.VerticalMenuItem',{
listeners: {
onOpenClose: function(btn){
"this" here is a "VerticalMenuItem"
}
}
});
},
如何访问此事件处理函数中的主要“this”对象(VerticalMenu)?