mouseup/mouseDoubleUp

Richard Gaskin ambassador at fourthworld.com
Tue Feb 1 16:56:53 EST 2011


Peter Haworth wrote:
 > I can accept that the first click generates a mouseUp message but
 > the second click within the doubleUpInterval should generate a
 > mouseDoubleUp shouldn't it?  That's what I consider to be a bug.

HyperCard (and apparently Flash in its default setup - interesting note, 
Colin) obviated the problem altogether by not providing any way to 
detect double clicks at all.  Problem solved. :)

LiveCode (and SuperCard and a few other xTalks) do provide messages for 
both single and double-clicks, but like I said the only way to invoke an 
action on a double-click without invoking two single-click actions is to 
delay all single-click handling by the doubleClickInterval.

That's what Craig's handy handler does, but if that were the default 
behavior of the LiveCode engine I suspect it would annoy people who 
don't need that distinction.

Consider the Finder:  imagine if you single-clicked on an object and it 
never hilited until more than 1/5th of a second had passed (the default 
doubleClickInterval is 200 ms).  Sure, that's a short duration, but it 
would make the Finder feel subtly sluggish.

Fortunately this isn't an issue with the Finder: since single-clicks on 
file objects perform no action, it can faithfully display your selection 
immediately without delay, appearing snappy and responsive.

The need to invoke actions on both messages is such an edge case that I 
feel it's appropriate to expect scripters to script things for such 
specialized needs.

Feel free to submit it to the RQCC if you like, but don't be surprised 
if it gets flagged as "Not a bug" because the only "fix" would reduce 
the apparent responsiveness of all other apps.

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  LiveCode Journal blog: http://LiveCodejournal.com/blog.irv




More information about the use-livecode mailing list