Hi all,i want to call a function that defined in the other class like the code show below,how should i make it?
Code:
ClassA = Ext.extend(ClassAUi, {
initComponent: function() {
ClassA.superclass.initComponent.call(this);
this.initActionHandler();
},
initActionHandler : function() {
this.getAddBtn().on('click',this.onClickAddBtn, this);
},
onClickAddBtn : function(){
//how can i call the function 'foo' that defined in classB?
},
getAddBtn : function(){
return Ext.getCmp("classA.add");
}
});
Ext.reg('ClassA',ClassA);
Code:
ClassB = Ext.extend(ClassBUi, {
initComponent: function() {
ClassB.superclass.initComponent.call(this);
},
foo : function(){
//do something
}
});
Ext.reg('ClassB',ClassB);