Extjs 4.1:非常奇怪的错误:未捕获类型错误:无法读取属性';项目';未定义的

Extjs 4.1:非常奇怪的错误:未捕获类型错误:无法读取属性';项目';未定义的,extjs,Extjs,您可以将示例:app/simple/app/Viewport.js更改为: 您将在Chrome控制台中看到此错误: 未捕获的TypeError:无法读取未定义的属性“items” ext all.js:18 ext.cmd.derivate.getDockedItems 但如果你对此发表评论: initComponent : function() { this.callParent(); },

您可以将示例:
app/simple/app/Viewport.js
更改为:

您将在Chrome控制台中看到此错误:

未捕获的TypeError:无法读取未定义的属性“items” ext all.js:18 ext.cmd.derivate.getDockedItems

但如果你对此发表评论:

initComponent : function() {
                            this.callParent();
                        },
一切都好

Ext.define('AM.view.Viewport', {
        extend : 'Ext.container.Viewport',

        layout: 'border',
        items : [{
                    border : false,
                    region : 'north',
                    xtype : 'progressbar',
                    text : 'Ready',
                    height : 20
                }, {
                    region : 'west',
                    xtype : 'userlist',
                    width:300
                }, {
                    region : 'center',
                    xtype : 'treepanel',
                    initComponent : function() {
                        this.callParent();
                    },
                    columns : [{
                                xtype : 'treecolumn',
                                sortable : false,
                                width : 200,
                                text : 'lala',
                                dataIndex : 'text'
                            }, {
                                flex : 1,
                                sortable : false,
                                text : 'haha',
                                dataIndex : 'pars'
                            }]
                }]
    });

1-尝试使用以下父参数调用:

.
.
.
,initComponent : function() {
 this.callParent(arguments);
 },
.
.
.
或者称之为超级类:

.
.

,initComponent : function() {
     this.callSuper(arguments);
 },
.
.
.

initComponent仅适用于新定义的组件。在“AM.view.Viewport”的情况下。不能为作为项中组件的配置插入的组件重写initComponent。如果要为该树面板定义initComponent,还必须对其进行扩展,然后将此扩展放入视口的项目中