1
我正在使用extjs4。如何在另一個成員函數(showSubject)中調用成員函數(hellotest)?如何在extjs4的另一個函數中調用函數?
我試圖在事件subjectBar
(它是showSubject
函數的一部分)中添加hellotest
的呼叫。我試圖使用範圍使用該函數調用,但這並沒有工作,我得到了以下錯誤:object[object object] error undefined function
這裏是我的一些代碼:
Ext.define('Am.DnycontentcategoriesController', {
extend: 'Ext.app.Controller',
init: function() {
this.control({
//'viewport > panel >Contentcategories':
'Contentcategories': {
render: this.showSubject,
}
});
},
hellotest: function() {
console.log("inside hello test function");
},
showSubject: function() {
//console.log(this.hellotest());
subjectBar.on('tabchange', function() {
//here I am getting error
this.hellotest();
var tab = subjectBar.getActiveTab();
--------
});
},