-
22 Aug 2010 9:22 AM #1
Tap and Doubletap on List object
Tap and Doubletap on List object
Hi to all, I've this list:
and I've added this code to capture tap and doubletap: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 });
But the tap event don't work... I try also with itemtap instead of tap...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 });
Thanks a lot
Stefano
-
22 Aug 2010 5:59 PM #2
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!
-
22 Aug 2010 11:29 PM #3
Hi Evant, Can I add
???Code:listeners: { tap: function(e){}, doubletap: function(e){} }
These events are not listed in "Events" list...
Thanks
Stefano
-
23 Aug 2010 12:05 AM #4
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!
-
23 Aug 2010 1:20 AM #5
ok, thanks a lot!
stefano
Similar Threads
-
Tap, doubletap & taphold on one component
By tobinharris in forum Sencha Touch 1.x: DiscussionReplies: 8Last Post: 20 Aug 2010, 1:06 AM -
[FIXED-22] doubletap event on Dataview isn't called (0.82)
By rdougan in forum Sencha Touch 1.x: BugsReplies: 2Last Post: 14 Aug 2010, 7:10 AM -
With the doubletap, will tap always be called, or is that a bug?
By rdougan in forum Sencha Touch 1.x: DiscussionReplies: 4Last Post: 6 Aug 2010, 9:55 PM -
Example for to get a Object List into Data grid
By Rahul Yadav in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 25 Feb 2008, 9:44 PM -
Returning a list of object?
By mythinky in forum Ext 1.x: Help & DiscussionReplies: 4Last Post: 31 Aug 2007, 12:05 AM


Reply With Quote