Results 1 to 2 of 2

Thread: [FIXED][3.0 SVN 4972] Container remove

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,966

    Default [TENT][3.0 SVN 4972] Container remove

    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.

    Code:
    /**
         * 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){
            this.initItems();
            var c = this.getComponent(comp);
            if(c && this.fireEvent('beforeremove', this, c) !== false){
                this.items.remove(c);
                delete c.ownerCt;
                if(this.layout && this.layout.onRemove){
                    this.layout.onRemove(c);
                }
                this.onRemove(c);
                if(autoDestroy === true || (autoDestroy !== false && this.autoDestroy)){
                    c.destroy();
                }
                this.fireEvent('remove', this, c);
            }
            return c;
        },
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,239

    Default

    Fixed in SVN.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •