-
8 Jun 2010 3:16 AM #1
With the doubletap, will tap always be called, or is that a bug?
With the doubletap, will tap always be called, or is that a bug?
Just a bit annoying, really.
-
8 Jun 2010 10:30 AM #2Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Haarlem, Netherlands
- Posts
- 1,235
- Vote Rating
- 4
Tap will always be called. The alternative would be to have the tap event fired after a delay which would be more of a bug. In the meantime there are plenty ways to work around it.
-
9 Jun 2010 8:02 AM #3Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,169
- Vote Rating
- 28
Seems that this is the exact same paradigm as "click" and "double click", which developers have managed for many years now.

Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.
-
26 Jul 2010 2:07 PM #4
This should help. Add to your Container/Component or whatever...
PHP Code:setupEventHandlers: function(){
this.mon(this.el, {
tap: function(e){
if(this.delayedTask == null){
//setup a delayed task that is called IF double click is not later detected
this.delayedTask = new Ext.util.DelayedTask(
function(){
this.doSomethingInteresting();
this.delayedTask = null;
}, this);
//once setup, need to start the clock (with reasonable time to cancel)
this.delayedTask.delay(300);
}
},
doubletap: function(e){
//Cancel and clear the delayed Task if it's there
//It would be set by the first single tap, but don't need it now we're on a double.
if(this.delayedTask != null){
this.delayedTask.cancel();
this.delayedTask = null;
}
//handle the double click as usual
this.doSomethingReallyInteresting();
},
scope: this
});
},
tobinharris.com
Leeds, UK
Co-author of NHibernate in Action
Likes iPhone, iPad, HTML5, .NET and Ruby on Rails
Developer and Founder at engineroomapps.com
-
6 Aug 2010 9:55 PM #5
All of the examples have 'event handlers' and 'listeners'. Could someone please indicate where I could put this?
uhm... politely? I know the most logical answer to that question.
Similar Threads
-
[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 -
TAP PANEL MULTIPLE FORMS MULTICOLUN
By jalberghini in forum Ext 2.x: Help & DiscussionReplies: 8Last Post: 10 Oct 2008, 11:11 AM -
getting onBrowserEvent called?
By mindstream in forum Community DiscussionReplies: 2Last Post: 10 Sep 2008, 2:35 PM -
why methods are not getting called?
By blancomario in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 4 Aug 2008, 11:48 AM


Reply With Quote
