Results 1 to 2 of 2

Thread: Cannot call method 'setHeight' of undefined

  1. #1
    Sencha User
    Join Date
    Dec 2011
    Vote Rating

    Default Cannot call method 'setHeight' of undefined


    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.

    PHP Code:
    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
    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.

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    It was an error in PR3 but has been fixed for the next release.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts