1. #1
    Sencha User siebmanb's Avatar
    Join Date
    Aug 2011
    Location
    Geneva (CH) - Grenoble (FR)
    Posts
    253
    Answers
    11
    Vote Rating
    15
    siebmanb will become famous soon enough

      0  

    Default Answered: removeAll with panel still scrolling breaks

    Answered: removeAll with panel still scrolling breaks


    Hello everyone,

    If you use the container.removeAll(true,true) function to destroy a panel that is still scrolling, a javascript error is returned and the removeAll fails :
    Code:
    TypeError: 'undefined' is not an object (evaluating 'this.getElement().dom.style')
    To reproduce, create a structure with 2 tabs (Container1 and Container2). Container1 contains a long view (View1). Opening Container2 calls removeAll on Container1. Slide View1 and open Container2 quickly.

    The only workaround I found is to explicitly stop scrolling before using removeAll
    Code:
    this.getView1().getScrollable().getScroller().stopAnimation();
    Any other idea ? Any fix ?

    Thank you !

    EDIT : the function removeAll breaks if the first parameter (destroy) is set to true
    Twitter account @siebmanb.
    Co-founder & CEO at ButterflyEffect.
    Mobile application developer using Sencha Touch and Phonegap for iOS, Android and webapp.

  2. Looks like using removeAll with the first parameter (destroy) to false works.
    Even when set to false, it actually destroys the removed component, not sure why. Maybe because of an autoDestroy somewhere.

  3. #2
    Sencha User siebmanb's Avatar
    Join Date
    Aug 2011
    Location
    Geneva (CH) - Grenoble (FR)
    Posts
    253
    Answers
    11
    Vote Rating
    15
    siebmanb will become famous soon enough

      0  

    Default


    Looks like using removeAll with the first parameter (destroy) to false works.
    Even when set to false, it actually destroys the removed component, not sure why. Maybe because of an autoDestroy somewhere.
    Twitter account @siebmanb.
    Co-founder & CEO at ButterflyEffect.
    Mobile application developer using Sencha Touch and Phonegap for iOS, Android and webapp.

  4. #3
    Sencha User
    Join Date
    Jan 2013
    Posts
    3
    Vote Rating
    0
    russian.hamburguer is on a distinguished road

      0  

    Default thanks

    thanks


    Thanks for posting your solution. Stop the scroll before destroying did work for me.

  5. #4
    Sencha User siebmanb's Avatar
    Join Date
    Aug 2011
    Location
    Geneva (CH) - Grenoble (FR)
    Posts
    253
    Answers
    11
    Vote Rating
    15
    siebmanb will become famous soon enough

      0  

    Default


    It works but it is a pain in the *** if you have a lot of different panels
    Twitter account @siebmanb.
    Co-founder & CEO at ButterflyEffect.
    Mobile application developer using Sencha Touch and Phonegap for iOS, Android and webapp.

Thread Participants: 1

Tags for this Thread