1. #1
    Touch Premium Member
    Join Date
    Feb 2009
    Location
    Firenze, Italia
    Posts
    162
    Vote Rating
    0
    stefx is on a distinguished road

      0  

    Default Tap and Doubletap on List object

    Tap and Doubletap on List object


    Hi to all, I've this list:

    Code:
    profiliList = new Ext.List({
                id: 'profiliList',
                hidden: 'true',
                fullscreen: true,
                tpl: '<tpl for="."><div class="profili" style=""><img src="profilo{id}.png" style="vertical-align:middle;padding-right: 5px" /><span>{profilo}</span></div></tpl>',
                itemSelector: 'div.profili',
                singleSelect: true,
                store: storeProfili
    });
    and I've added this code to capture tap and doubletap:
    Code:
    profiliList.mon(profiliList.getEl(), {
                tap: function(e){
                    if(this.delayedTask == null){                         
                        this.delayedTask = new Ext.util.DelayedTask(
                            function(){
                                alert("tap");
                                this.delayedTask = null;
                            }, this
                        );
                        this.delayedTask.delay(300);
                    }                      
                },
                doubletap: function(e){ 
                    if(this.delayedTask != null){
                        this.delayedTask.cancel();
                        this.delayedTask = null;
                    }       
                    alert("doubletap");
               },              
               scope: profiliList
           });
    But the tap event don't work... I try also with itemtap instead of tap...
    Thanks a lot
    Stefano

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,645
    Vote Rating
    583
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Why have you used that code? tap and doubletap will fire without that, I don't know what you're asking here.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Touch Premium Member
    Join Date
    Feb 2009
    Location
    Firenze, Italia
    Posts
    162
    Vote Rating
    0
    stefx is on a distinguished road

      0  

    Default


    Hi Evant, Can I add
    Code:
    listeners: { 
                    tap: function(e){},
                    doubletap: function(e){}
                }
    ???
    These events are not listed in "Events" list...
    Thanks
    Stefano

  4. #4
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,645
    Vote Rating
    583
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    No, the appropriate events are itemtap and itemdoubletap. Looks like the docs are a bit messed up, there's 2 itemswipe listed, should only be one, the other should be itemdoubletap.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  5. #5
    Touch Premium Member
    Join Date
    Feb 2009
    Location
    Firenze, Italia
    Posts
    162
    Vote Rating
    0
    stefx is on a distinguished road

      0  

    Default


    ok, thanks a lot!
    stefano

Similar Threads

  1. Tap, doubletap & taphold on one component
    By tobinharris in forum Sencha Touch 1.x: Discussion
    Replies: 9
    Last Post: 13 Jun 2014, 5:53 AM
  2. [FIXED-22] doubletap event on Dataview isn't called (0.82)
    By rdougan in forum Sencha Touch 1.x: Bugs
    Replies: 2
    Last Post: 14 Aug 2010, 7:10 AM
  3. With the doubletap, will tap always be called, or is that a bug?
    By rdougan in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 6 Aug 2010, 9:55 PM
  4. Example for to get a Object List into Data grid
    By Rahul Yadav in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 25 Feb 2008, 9:44 PM
  5. Returning a list of object?
    By mythinky in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 31 Aug 2007, 12:05 AM

Thread Participants: 1

Tags for this Thread