Inheritance 继承失败
im为窗体和网格开发windows装饰程序。我有一个抽象类:Inheritance 继承失败,inheritance,extjs,window,Inheritance,Extjs,Window,im为窗体和网格开发windows装饰程序。我有一个抽象类: Ext.define('AM.view.ui.DecoratorAbstract',{ extend: 'Ext.window.Window', alias: 'widget.decoratorAbstract', initComponent: function(){ this.resizable = this.cfg[0]; this.closable = this.cfg[1
Ext.define('AM.view.ui.DecoratorAbstract',{
extend: 'Ext.window.Window',
alias: 'widget.decoratorAbstract',
initComponent: function(){
this.resizable = this.cfg[0];
this.closable = this.cfg[1];
this.minimizable = this.cfg[2];
//this.items = this.anItem;
this.callParent(arguments);
}
});
一个子类,没有包含网格的按钮,可以很好地工作:
Ext.define('AM.view.ui.DecoratorGrid',{
extend: 'AM.view.ui.DecoratorAbstract',
alias: 'widget.decoratorGrid',
initComponent: function(){
this.callParent(arguments);
}
});
最后,对于表单,有两个按钮:
Ext.define('AM.view.ui.DecoratorForm',{
extend: 'AM.view.ui.DecoratorAbstract',
alias: 'widget.decoratorForm',
initComponent: function(){
this.buttons = [
{ text:'Guardar', action:'save', iconCls: 'ico-save' },
{ text:'Cancelar', action:'cancel', iconCls: 'ico-cancel' }
];
this.callParent(arguments);
}
});
问题是,显示的te按钮不是guardar/cancelar。窗口显示主工具栏程序的按钮
图像:
有什么想法吗
注意:工具栏是在app.js中创建的。Windows在Firebug中进行了测试:
Ext.create('AM.view.ui.DecoratorForm',{cfg:[true,true,true]}).show();
“显示主工具栏程序的按钮”是什么意思?@kevhender现在发布一张图片。你能显示一下你在哪里实例化这些类吗?你一定是在什么地方配置错了。。。