PDA

View Full Version : How to unbind a function from an event.



samir_ware
22 Aug 2012, 10:24 PM
Hello All
I have bounded a function to the load event of store as below .


store.on('load',handleStoreLoad.createCallback(params));


Can anyone please tell me how do I unbind the functin handleStoreLoad from the load event ?
I tried doing



store.un('load',handleStoreLoad.createCallback(params));


Though it did not work for me :-?. Any link , paper will greatly be appreciated.
Thanks in advance
Samir

samir_ware
22 Aug 2012, 10:25 PM
Forgot to mention , I as well tried



store.un('load',handleStoreLoad);
Still it did not work for me :(

sword-it
22 Aug 2012, 11:43 PM
Hi,

You can see this link : http://docs.sencha.com/ext-js/3-4/#!/api/Ext.EventManager-method-removeListener