Results 1 to 2 of 2

Thread: Catch a tap event of a carousel in controllers control: definition

  1. #1
    Sencha User
    Join Date
    Dec 2012
    Vote Rating

    Default Unanswered: Catch a tap event of a carousel in controllers control: definition

    I would like to to catch a tap event on a carousel in the control section of a controller. Like:

    control: {
    mycarouselView: {
    initialize: 'initMycarousel',
    tap: '

    Initialize fires but not tap. That is, how I learnt in Stackoverflow forum, because the event goes to the element of a carousel, not the carousel itself. So I put following code into the initialize function of my carousel:

    carousel.element.on( 'tap' , function(e, el) {
    }, this);

    This works fine, but then I define my events at two different locations. Is there a way to get it done in the control-definition?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    The carousel component doesn't have a tap event which is what the control config in the controller is going to listen for. The tap event is on the element so the controller cannot listen to it, you need to fire an event on the carousel component for the controller to hear the event.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2

    Think my support is good? Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Tags for this Thread

Posting Permissions

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