Oops, so it is. Its easy to forget these things when you use the command
a lot.
>1) making a "pendingEvents" property that you could use to get a list
>of all the events in the queue. Deleting just a few of a particular
>type would be kind of tricky: you'd have to delete them out of the
>property and then set it again. Deleting all of them would be easy:
>set the pendingEvents to empty
This has the advantage of being very simple for most purposes.
>2) Add a "dispatch events" command, that would cause all pending
>messages to be delivered. This would solve the problem in question
>(the messages would be sent while the button was disabled), but could
>get hairy if the messages send cause the handler (or some other
>long-running handler) to be called again. It would also allow
>something that people occasionally ask for: you could process keyboard
>events while inside another handler, something that's impossible to do
>now since there is no analog to the "mouseClick" function for key
>presses.
The functionality would occasionaly be useful, but in most circumstances
too complex.
Personally i'd go for the first one. Couldn't you use that to implement
a keypress event inside another script anyway, as the list might contain
"keydown x", which you could either use, erase or send? That would in
fact provide great new functionality - allowing the user to effectively
retreive events from the event queue whenever they liked.
regards,
Kevin.