PDA

View Full Version : object#<object> has no method 'create'



Kibui
24 Aug 2011, 11:42 PM
Hi all I need some help with this code, im geting the error : object#<object> has no method 'create'



Ext.onReady(function() {
var panel = Ext.create('Ext.Panel', {

id:'main-panel',
baseCls:'x-plain',
renderTo: 'ja-container',
layout: {
type: 'table',
columns: 3
},

// applied to child components
defaults: {frame:true, width:200, height: 200},

items:[{
region:'north',contentEl:'header',margins:'0 0 5 0'
},
earthpanel
,{
region:'west',contentEl:'west',id:'controlPanel',title:'WOP-Africa Indicators',split:true,width:250,minSize:175,maxSize:330,collapsible:true,margins:'0 0 0 5',layout:'accordion',layoutConfig:{animate:true},defaults:{bodyStyle:'padding: 3px 7px'}
},{
contentEl:"about",region:"east",id:'GRUBS',bodyStyle:{"padding":"0px"},collapsible:true,collapseMode:"mini",split:true,width:650,title:"Tables/charts",margins:'0 0 0 0'
},{
region:'south',contentEl:'south',id:'sourcePanel',split:true,height:120,minSize:50,maxSize:200,collapsible:true,title:'Source',bodyStyle:'padding: 5px',margins:'0 5 5 5',autoScroll: true
}]

});
});

skirtle
26 Aug 2011, 5:36 AM
It looks like there's a problem with the Ext namespace, though it's odd that onReady is working.

Could you try adding console.dir(Ext) immediately before the call to Ext.create()? See what logging that gives you.

Are the ExtJS JavaScript files definitely being included correctly? Is it possible they've been included more than once perhaps?

wheelhouse
26 Aug 2011, 5:25 PM
Try Ext.create('Ext.panel.Panel', {