[comp.sys.mac.hypercard] Preventing mouseClick actions: why does this work?

geoff@pmafire.UUCP (Geoff Allen) (08/10/89)

I posted the following question a few weeks ago, but got no response.  I
don't know if that's because my article didn't get out to the rest of
the known world or it's just that noone answered.  Anyway, here's my
question:

A while back, Peggy Lerch wrote asking for a way to prevent mouseClick
actions (She had an enthousiastic youngster who clicked away at a
button.  Each click got queued up, so the handler executed over and over
again.)

Jim Taylor responded with the simple solution to add "wait until the
mouse is up" at the end of the script.  It works! I've used it a stack
I'm working on.  My question is, "Why?"

When a normal handler is executing, any further events (e.g. mouseUp)
get queued up to be handled when the present handler is through.  I
don't understand why waiting until the mouse is up clears any mouseUps
which occurred during the time the script was running.

Maybe some of the higher gurus of HyperCard can explain this.

-- 
Geoff Allen - WINCO Computer Process Engineering
------------------------------------------------------------------------------
...{uunet|bigtex}!pmafire!geoff  |  Disclaimer:  WINCO doesn't believe in Macs,
...ucdavis!egg-id!pmafire!geoff  |  so of course these are my own views.