PDA

View Full Version : destroy() for all



Choleriker
15 Mar 2007, 4:16 AM
Hello,

im using a grid with a paging-tb which i have to destroy and rebuild anytime. I have seen that many components hasnt a destroy() method, but i think its needed! Here my (simple) code for the destroing a toolbar:



Ext.Toolbar.prototype.destroy = function() {
for(var i=0, l=this.items.getCount(); i<l; i++) {
var itm = this.items.get(i);
if(itm.purgeListeners) itm.purgeListeners();
}
};