Update on defaultStack problem

Richard Gaskin ambassador at fourthworld.com
Tue Feb 1 13:33:04 EST 2011


Peter Haworth wrote:

 > On Feb 1, 2011, at 6:55 AM, DunbarX at aol.com wrote:
 >
 >> I have always had this problem, that the engine will not distinguish
 >> the two "ups" if they are in the same handler.
 >>
 >> I use the old HC method:
 >>
 >> on mouseUp
 >>   wait 15 --your comfort level
 >>   if the mouseCllick then doDoubleStuff
 >>   else doSingleStuff
 >> end mouseUp
 >
 > Thanks Craig, I'll give that a try.  Sounds like a bug in LC.

Not a bug, it's just extremely rare that the two messages are used in 
the same control.

Personally, I'd sooner at a "Revert" control than ask a user to 
double-click, but maybe that's just me.

DunbarX's script will do the trick, but if you like you can account for 
the user-settable nature of the double click interval by using the LC 
global property named -- you guessed it -- doubleClickInterval.

To be uber-correct in such distinctions you may also want to take into 
account the doubleClickDelta, but that may be overkill for a simple app.

--
  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