JSassy
14 Nov 2012, 7:35 AM
Hello,
I'm using ExtJs 4.1.1a and I have no idea how to remove a Listener or to disable it for some time.
I have a controller and I register some events in its init function like this:
this.control({
'mypanel': {
beforeclose: this.onBeforeClose,
clickconstruction: this.onClick
}
});
clickconstruction is fired in another controller with
mypanel.fireEvent('clickconstruction');
Now I am trying to remove the listener or to suspend the events but it does not work:
mypanel.un('clickconstruction', this.onClick);
How do I remove or suspend correctly?
I'm using ExtJs 4.1.1a and I have no idea how to remove a Listener or to disable it for some time.
I have a controller and I register some events in its init function like this:
this.control({
'mypanel': {
beforeclose: this.onBeforeClose,
clickconstruction: this.onClick
}
});
clickconstruction is fired in another controller with
mypanel.fireEvent('clickconstruction');
Now I am trying to remove the listener or to suspend the events but it does not work:
mypanel.un('clickconstruction', this.onClick);
How do I remove or suspend correctly?