|
|
Re: Strange key event handling when too many events accumulate [message #68394 is a reply to message #68393] |
Wed, 28 October 2009 10:04  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Oliver writes:
> I'm observing the following behaviour with key events from
> widget_draw:
> E.g. widget_draw sends key events which are processed by a display
> method which (say for the 'n'-key) displays the next position in an
> image stack.
> When I keep the 'n'-key pressed, the key-repetition will send events
> faster than the display method can handle them (there's some
> calculation stuff involved).
> What happens is that when I release the 'n'-key, scrolling stops
> immediately, but when I press it only once again, the display method
> gets called another x times from key events that (my interpretation)
> seem to have lived in some sort of buffer and had not yet been
> processed.
> Does anyone know this behaviour and is there some remedy against it?
You could try clearing your queued up events from
your draw widget:
Widget_Control, drawID, /Clear_Events
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|