Results 1 to 4 of 4

Thread: Creating a GridPanel throws "this.addEvents is not a function" error

  1. #1
    Sencha User Dumas's Avatar
    Join Date
    Dec 2008
    Location
    Vienna, Austria
    Posts
    589

    Question Creating a GridPanel throws "this.addEvents is not a function" error

    Hi!

    I have a problem when creating a new GridPanel. It seems very trivial, but I don't get it

    When I create a new GridPanel with the code below I get following error;
    "TypeError: this.addEvents is not a function "
    The error is thrown in the Ext.Component when this.addEvents(...someEvents...); is called

    My code is just
    Code:
    var grid = Ext.grid.GridPanel({
        title: 'title',
        store: store,
        columns: [{
            header: 'header',
            dataIndex: 'name'
        }]
    });
    Any ideas?

    thx!
    Dumas

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890

    Default

    Same as whenever this question is raised here (as you would find if you searched)

    You forgot "new"

  3. #3
    Sencha User Dumas's Avatar
    Join Date
    Dec 2008
    Location
    Vienna, Austria
    Posts
    589

    Default

    Oh sry, to stupid mistake right after each other, what a shame

  4. #4
    Sencha User VinylFox's Avatar
    Join Date
    Mar 2007
    Location
    Baltimore, MD
    Posts
    1,501

    Default

    I put together a blog post on these common errors not too long ago....might help.

    http://www.vinylfox.com/some-common-...ges-explained/

Posting Permissions

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