You found a bug! We've classified it as TOUCH-3663 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Mar 2007
    Posts
    411
    Vote Rating
    17
    jweber will become famous soon enough

      0  

    Default activeitemchange event order different in view/controller

    activeitemchange event order different in view/controller


    REQUIRED INFORMATION


    Ext version tested:
    • Sencha Touch 2.1b1, 2,1rc2

    Browser versions tested against:
    • Chrome 22.0.1229.94

    DOCTYPE tested against:
    • html

    Description:
    • When I set an activeitemchange listener on a carousel, if I set it from a controller, it fires before the activeItem is changed. But if I set it on the view itself, it fires after the activeItem is changed.

    Steps to reproduce the problem:
    • Load the code below, and swipe to the left.

    The result that was expected:
    • Both listeners log the same value to the console, to indicate that they both were called before or after the activeItem changed.

    The result that occurs instead:
    • The controller's listener logs "false", and the view's listener logs "true".
      Code:
      activeitemchange from controller: false
      activeitemchange from view: true

    Test Case:

    Code:
    Ext.define('Test.view.MyCarousel', {
    	extend: 'Ext.carousel.Carousel',
    	xtype: 'myCarousel',
    	config: {
    		fullscreen: true,
    		items: [{
    			itemId: 'a',
    			html: 'a'
    		}, {
    			itemId: 'b',
    			html: 'b'
    		}, {
    			itemId: 'c',
    			html: 'c'
    		}],
    		listeners: {
    			activeitemchange: function(carousel, value, oldValue, eOpts) {
    				console.log('activeitemchange from view:', value === carousel.getActiveItem());
    			}
    		}
    	}
    });
    
    Ext.define('Test.controller.MyController', {
    	extend: 'Ext.app.Controller',
    	config: {
    		control: {
    			'myCarousel': {
    				activeitemchange: 'onCarouselChange'
    			}
    		}
    	},
    	onCarouselChange: function(carousel, value, oldValue, eOpts) {
    		console.log('activeitemchange from controller:', value === carousel.getActiveItem());
    	}
    });
    
    Ext.application({
    	name: 'Test',
    	controllers: ['MyController'],
    	views: ['MyCarousel'],
    	launch: function() {
    		Ext.create('Test.view.MyCarousel');
    	}
    });


    HELPFUL INFORMATION


    Screenshot or Video:
    • N/A

    See this URL for live test case: N/A


    Debugging already done:
    • none

    Possible fix:
    • not provided

    Additional CSS used:
    • only default ext-all.css

    Operating System:
    • Mac OS 10.8

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,791
    Vote Rating
    833
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi