Results 1 to 2 of 2

Thread: Why activate event run tow times every time.

  1. #1
    Sencha User
    Join Date
    Mar 2011
    Posts
    1
    Vote Rating
    0
      0  

    Default 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

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    The active item is changed many times for the Content panel.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •