-
5 May 2013 1:38 AM #1
Exception is thrown when carousel is destroyed
Exception is thrown when carousel is destroyed
REQUIRED INFORMATION
Project Type:- Touch 2.2.0
- When destroying a carousel an exception will be thrown if the carousel contains items that has been flipped.
- Create a carousel with a couple of panels with card layouts.
- Flip one of the cards.
- Destroy the carousel.
- The carousel should be destroyed and no exception should be thrown.
- Exception is thrown: Uncaught TypeError: Cannot call method 'getParent' of undefined Flip.js:38.
Screenshot, Project, or Video:- See the app.js example below. Use it in a newly generated 2.2.0 app to trigger the exception.
Code:// DO NOT DELETE - this directive is required for Sencha Cmd packages to work. //@require @packageOverrides //<debug> Ext.Loader.setPath({ 'Ext': 'touch/src', 'test': 'app' }); //</debug> Ext.application({ name: 'test', requires: [ 'Ext.MessageBox', 'Ext.Carousel' ], views: [ 'Main' ], icon: { '57': 'resources/icons/Icon.png', '72': 'resources/icons/Icon~ipad.png', '114': 'resources/icons/Icon@2x.png', '144': 'resources/icons/Icon~ipad@2x.png' }, isIconPrecomposed: true, startupImage: { '320x460': 'resources/startup/320x460.jpg', '640x920': 'resources/startup/640x920.png', '768x1004': 'resources/startup/768x1004.png', '748x1024': 'resources/startup/748x1024.png', '1536x2008': 'resources/startup/1536x2008.png', '1496x2048': 'resources/startup/1496x2048.png' }, launch: function() { var cards = Ext.create('Ext.Carousel', { fullscreen : true, items: [ { layout: 'card', items: [ { html : 'Front' }, { html : 'Back' } ] }, { layout: 'card', items: [ { html : 'Front' }, { html : 'Back' } ] } ] }); // If you comment away this line the exception won't be thrown. cards.getAt(1).animateActiveItem(1, { type: 'flip' }); Ext.defer(function () { cards.destroy(); }, 3000); }, onUpdated: function() { Ext.Msg.confirm( "Application Update", "This application has just successfully been updated to the latest version. Reload now?", function(buttonId) { if (buttonId === 'yes') { window.location.reload(); } } ); } });
-
5 May 2013 9:50 AM #2
Moved to Sencha Touch bugs forum.
Aaron Conran
@aconran
Sencha Architect Development Team
-
6 May 2013 6:48 AM #3Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
This has already been fixed for the next (ST 2.2.1) release.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.


Reply With Quote