I looked through the archives and didn't see an answer to this one-- so I thought I'd post my own :-)

If you have both a mouseUp and mouseDoubleUp handler in a single button script, both will be executed when you double-click the button.

But, what if you only want the mouseDoubleUp to execute and NOT the mouseUp? Well, I chatted this eve with Ken Ray and Jan Schenkel and came up with the following (they both had a bit of a different spin on it, perhaps they'll elaborate).

Here's the guts:

local lDoubleClick

on mouseUp
  send "doClick" to me in (the doubleClickInterval) milliseconds
end mouseUp

on mouseDoubleUp
  put true into lDoubleClick
end mouseDoubleUp

on doClick
  if lDoubleClick = true then
     --> doDoubleClickstuff
    put false into lDoubleClick
  else
    --> doSingleClickStuff
  end if
end doClick

best,

Chipp
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to