You found a bug! We've classified it as a bug in our system. We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Feb 2008
    Posts
    156
    Vote Rating
    1
    WixSL is on a distinguished road

      0  

    Default [2.2.1] Ext.Component.showBy changes container of components to the Viewport!

    [2.2.1] Ext.Component.showBy changes container of components to the Viewport!


    Using Version 2.2.1.

    "Ext.Component.showBy" method CHANGES the container of the component being show ?!?!?!?!?

    This can't be a correct behaviour.

    I saw this after a long struggle searching the cause why myPanel.up('myPanel_Container_XType') always return undefined.

    Code:
    showBy: function(component, alignment) {
            var me = this,
                viewport = Ext.Viewport,
                parent = me.getParent();
    
            me.setVisibility(false);
    
            if (parent !== viewport) {
                viewport.add(me);
            }
    
            me.show();
    
            me.on({
                hide: 'onShowByErased',
                destroy: 'onShowByErased',
                single: true,
                scope: me
            });
            viewport.on('resize', 'alignTo', me, { args: [component, alignment] });
    
            me.alignTo(component, alignment);
            me.setVisibility(true);
        }
    The best i could find in the forums releated to this was the following thread:

    this.parent and this.getParent() always return undefined in initialize

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,609
    Vote Rating
    818
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Yeah, I think it also needs to check if parent is undefined.

    Thanks for the report! I have opened a bug in our bug tracker.

Thread Participants: 1