PDA

View Full Version : Cannot call method 'setHeight' of undefined



WillBill
28 Dec 2011, 1:56 AM
Hi,

I'm not sure if this is a bug or if I'm just messing up. But i'm trying to add an Image to my panel view,
but it seems when I try to define it's size i get a "Cannot call method 'setHeight' of undefined" error.

Not sure why this is, but if i use flex it does show up. But flex messes up my layout (probably due to
my lack of it's understanding), so I really need to be able to set its height/width.



Ext.define('App.view.Home', {
extend : 'Ext.Panel',
alias : 'widget.home',
config : {
items : [
{
xtype : 'navigationbar',
title : 'Home',
items : [
{
xtype : 'button',
text : 'knop',
align : 'right',
itemId : 'menuBtn'
}
]
},
{
xtype : 'image',
src : 'app/images/logo.jpg',
height : 150,
width : 400
}
]
}
});


//Edit//
I can set its height/width in CSS, which solves my problem for now. But I'm still confused as to why it throws an error.

mitchellsimoens
28 Dec 2011, 7:23 AM
It was an error in PR3 but has been fixed for the next release.