PDA

View Full Version : Listeners problem extending a class



alex1981
22 Jul 2010, 2:28 AM
Hi everybody, I have a little problem while I'm trying to extend a class. What I've done was add a listener directly into the extended class (and it's working quite well). Problems comes when I istantiate that class (the extended one) and I add another listener (different from the one coded in the extension). Note that inside the extended class I use Ext.apply to "merge" two definition of listener object but the coded listeners seems to disappear ( In firebug i can see listeners object containing all the coded listeners + the new defined while the istantiation).

Waiting for your help

Thanks in advance

Animal
22 Jul 2010, 2:56 AM
Don't "merge" anything.

Add listeners.

Use the addListener (or "on") method