PDA

View Full Version : Extjs 4.1: So strange error: Uncaught TypeError: Cannot read property 'items' of unde



alwayscy
10 Oct 2013, 7:17 AM
you can change sample: app/simple/app/Viewport.js to this:

you'll get this error in Chrome console:
Uncaught TypeError: Cannot read property 'items' of undefined ext-all.js:18
Ext.cmd.derive.getDockedItems

But if you comment this:
initComponent : function() {
this.callParent();
},
Everything is ok.



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'
}]
}]
});

Gary Schlosberg
12 Oct 2013, 5:03 AM
http://www.sencha.com/forum/showthread.php?273495