Results 1 to 3 of 3

Thread: Problem extending Observable...

  1. #1

    Default Problem extending Observable...

    Howdee folks,

    I'm trying to 'subclass' Ext.util.Observable' and my first step was to try to run the example code from the API docs.

    Sadly, the call to '' fails on line 1285 of ext-all-debug.js with:-

    TypeError: Object #<an Object> has no method 'on'

    The code I lifted from the API docs is shown below:-

    Any help greatly appreciated!


    Employee = Ext.extend(Ext.util.Observable, {
        constructor: function(config){
                "fired" : true,
                "quit" : true
            // Copy configured listeners into *this* object so that the base class's
            // constructor will add them.
            this.listeners = config.listeners;
            // Call our superclass constructor to complete construction process.
    var newEmployee = new Employee({
        name: employeeName,
        listeners: {
            quit: function() {
                // By default, "this" will be the object that fired the event.
                alert( + " has quit!");
    Last edited by evant; 16 Feb 2010 at 2:46 AM. Reason: Please use [code][/code] tags

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Sydney, Australia


    Code:, config);
    I'll add a fix to the docs.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  3. #3


    Thanks Evan!

Posting Permissions

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