-
2 Jan 2013 3:04 AM #1Sencha User
- Join Date
- Aug 2011
- Location
- Geneva (CH) - Grenoble (FR)
- Posts
- 250
- Vote Rating
- 14
- Answers
- 11
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 :
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.Code:TypeError: 'undefined' is not an object (evaluating 'this.getElement().dom.style')
The only workaround I found is to explicitly stop scrolling before using removeAll
Any other idea ? Any fix ?Code:this.getView1().getScrollable().getScroller().stopAnimation();
Thank you !
EDIT : the function removeAll breaks if the first parameter (destroy) is set to trueTwitter account @siebmanb.
Co-founder & CEO at ButterflyEffect.
Mobile application developer using Sencha Touch and Phonegap for iOS, Android and webapp.
-
Best Answer Posted by siebmanb
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.
-
2 Jan 2013 3:13 AM #2Sencha User
- Join Date
- Aug 2011
- Location
- Geneva (CH) - Grenoble (FR)
- Posts
- 250
- Vote Rating
- 14
- Answers
- 11
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.
-
27 Feb 2013 7:32 AM #3
thanks
thanks
Thanks for posting your solution. Stop the scroll before destroying did work for me.
-
27 Feb 2013 7:42 AM #4Sencha User
- Join Date
- Aug 2011
- Location
- Geneva (CH) - Grenoble (FR)
- Posts
- 250
- Vote Rating
- 14
- Answers
- 11
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.


Reply With Quote