View Full Version : [FIXED][3.0 SVN 4972] Container remove

5 Aug 2009, 12:52 PM
The very recent onRemove additions do not yet take into account the potential to remove items from a Container before either it or its layout are rendered yet (layout is still a string). Example of this occurs with the ProgressBarPager ux.plugin. It tries to remove an item from the Toolbar Container before it's rendered.

This is a temporary patch at best, but solves the problem short-term. :-?

* Removes a component from this container. Fires the {@link #beforeremove} event before removing, then fires
* the {@link #remove} event after the component has been removed.
* @param {Component/String} component The component reference or id to remove.
* @param {Boolean} autoDestroy (optional) True to automatically invoke the removed Component's {@link Ext.Component#destroy} function.
* Defaults to the value of this Container's {@link #autoDestroy} config.
* @return {Ext.Component} component The Component that was removed.
remove : function(comp, autoDestroy){
var c = this.getComponent(comp);
if(c && this.fireEvent('beforeremove', this, c) !== false){
delete c.ownerCt;
if(this.layout && this.layout.onRemove){
if(autoDestroy === true || (autoDestroy !== false && this.autoDestroy)){
this.fireEvent('remove', this, c);
return c;

5 Aug 2009, 4:39 PM
Fixed in SVN.