View Full Version : Removing event listeners
Hello, I noticed that the option destroyable will be available as of version 4.1.2, but until then, how would you remove listeners added in the following manner:
myComp.addListener({
render: function(){
//dostuff
},
customevent: function(){
//domorestuff
},
scope:this
});
Thanks!
Farish
21 Sep 2012, 12:10 AM
take a look at this link:
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.Element-method-un (http://docs.sencha.com/ext-js/4-0/#%21/api/Ext.Element-method-un)
adding a listener:
store.on('load', handlerFunction);
removing a listener:
store.un('load', handlerFunction);
Thanks. I was hoping there was a way to do this without having to declare every function handler, but I guess I'll have to wait until 4.1.2 for that.
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.