-
8 Apr 2012 3:26 AM #1
Why activate event run tow times every time.
Why activate event run tow times every time.
My code below.My problem is when the viewport start the "TopCarousel" activate event will run two times every time.If the "TopCarousel" loaded tow times? Somebody can help me fix the bug.Thanks a lot!
Code:Ext.define('TopCarousel', { extend: 'Ext.Carousel', config: { layout:'card', indicator: true, height:160, ui:'dark', scrollable: { direction: false, directionLock: false }, items:[ {html:'Carousel1'}, {html:'Carousel2'} ], listeners:{ activate:function(){console.log(1);} } } }); Ext.application({ launch: function() { var Content=Ext.create('Ext.Panel',{" fullscreen:true, items:[ new TopCarousel, { xtype:'panel', html:'DownContent' } ] }); Ext.Viewport.add(Content); } });Last edited by mitchellsimoens; 24 Apr 2012 at 7:53 AM. Reason: added [CODE] tags
-
24 Apr 2012 7:59 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
The active item is changed many times for the Content panel.
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.


Reply With Quote