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 - Sr Software Engineer 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
    Sencha Inc, Senior Software Engineer
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2

    Think my support is good? Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Posting Permissions

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