klingenm
23 Dec 2009, 5:54 AM
It seems that Ext.util.Observable constructor differs from other common constructors in a weird way.
If you extend Observable, you will have to set "this.listeners = config.listeners" before calling superclass.constructor, since the constructor does not check config at all, only this.listeners.
Is there a sensible reason for this? I see no reason why the constructor does not even take the config parameter at all, eventhough the documentation says that listeners is a valid config property.
http://www.extjs.com/deploy/dev/docs/?class=Ext.util.Observable (http://www.extjs.com/forum/../deploy/dev/docs/?class=Ext.util.Observable)
If you extend Observable, you will have to set "this.listeners = config.listeners" before calling superclass.constructor, since the constructor does not check config at all, only this.listeners.
Is there a sensible reason for this? I see no reason why the constructor does not even take the config parameter at all, eventhough the documentation says that listeners is a valid config property.
http://www.extjs.com/deploy/dev/docs/?class=Ext.util.Observable (http://www.extjs.com/forum/../deploy/dev/docs/?class=Ext.util.Observable)