Page 1 of 1

How to clear queued pushed button messages

Posted: Sun Mar 13, 2016 9:58 pm
by KimD
I know that I've seen this somewhere before, but I can't find the words to search on which tell me about the command that clears the queue of buttons that the user has already clicked

Scenario :
1) User is clicking on buttons as part of a game
2) User reaches the end point of the game, but has overshot by clicking too many buttons

The user has already won - how do I clear the excess of user button clicks?

Thanks in advance

Re: How to clear queued pushed button messages

Posted: Mon Mar 14, 2016 4:41 pm
by jacque
See "flushEvents" in the dictionary.

Re: How to clear queued pushed button messages

Posted: Mon Mar 14, 2016 7:47 pm
by KimD
Thanks. I was searching on "Clear", "Delete", "Empty" etc. Never thought of "Flush" ;-)

Re: How to clear queued pushed button messages

Posted: Mon Mar 14, 2016 9:48 pm
by FourthWorld
KimD wrote:Thanks. I was searching on "Clear", "Delete", "Empty" etc. Never thought of "Flush" ;-)
The name was borrowed from an old Mac API call. If that one seems unintuitive check out the ink property values, also borrowed from the same source. :)