有谁知道如何在ext js 3.4中成功调用超类? 在我的示例代码中,我似乎无法获得在面板上工作的超类。如何在变量内调用ext js 3.4中的超类
MyWindow = Ext.extend(MyWindowUi, {
initComponent: function() {
MyWindow.superclass.initComponent.call(this);
this.createTextField();
},
createTextField : function() {
var p = new Ext.Panel({
title: 'somepanel',
initComponent: function() {
console.log('init component');
console.log(this);
this.superclass.initComponent.call(this); //NOT WORKING??
}
});
this.add(p);
}
});
我尝试使用超类,但没有呈现面板。 Ext.Panel.prototype.initComponent.call(this);为我工作。 – chriscrossweb 2013-03-25 19:58:40