Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-971 in a recent build.
  1. #11
    Sencha User
    Join Date
    Jan 2012
    Posts
    28
    Vote Rating
    2
    ratmat2000 is on a distinguished road

      0  

    Default


    Having the same problem and using setTimeout delay as a workaround.
    -->

  2. #12
    Ext JS Premium Member
    Join Date
    Aug 2011
    Posts
    37
    Vote Rating
    0
    jakobgrannas is on a distinguished road

      0  

    Default


    This is still an issue in B1.

    This works:
    Code:
    this.onAfter('activeitemchange', this.onActiveItemChange, this);
    ...
    onActiveItemChange: function(scope, newCard, oldCard, eOpts) {
            if(oldCard) {
                oldCard.destroy();
            }
        }
    But if I remove 'After' from this.onAfter, it removes the card prematurely and throws an error.
    -->

  3. #13
    Sencha User geekflyer's Avatar
    Join Date
    Nov 2011
    Location
    Mannheim, Germany
    Posts
    52
    Vote Rating
    2
    geekflyer is on a distinguished road

      0  

    Default


    Maybe this helps to any of you guys:
    Since ST2 B1 you can remove an item from a card layout with animation.
    In case you pass as the second parameter "true", the removed item will be destroyed automatically.
    I'm using the code below in one of my controllers, which removes my View called "Workspace" and destroys it with animation. It also switches back automatically to the item which was active before, in my case the Login View. (so i don't call setActiveItem()).

    Code:
    this.getViewport().remove(this.getWorkspace(), true);
    -->

  4. #14
    Ext JS Premium Member
    Join Date
    Aug 2011
    Posts
    37
    Vote Rating
    0
    jakobgrannas is on a distinguished road

      0  

    Default


    Quote Originally Posted by geekflyer View Post
    Maybe this helps to any of you guys:
    Since ST2 B1 you can remove an item from a card layout with animation.
    In case you pass as the second parameter "true", the removed item will be destroyed automatically.
    I'm using the code below in one of my controllers, which removes my View called "Workspace" and destroys it with animation. It also switches back automatically to the item which was active before, in my case the Login View. (so i don't call setActiveItem()).

    Code:
    this.getViewport().remove(this.getWorkspace(), true);
    Thanks, but that doesn't help as it is the timing of the removal that is the problem, not the removal itself.
    -->

  5. #15
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    18
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Unfortunately this thread is littered with different cases and incomplete examples where we can no longer determine what the remaining issue is. I'm going to close this thread and if someone can please post a complete and reproducible test case which shows the issue we will be more than happy to address it.

    Sencha Inc

    Jamie Avins

    @jamieavins
    -->