checking for pending events [message #7641] |
Wed, 27 November 1996 00:00 |
chase
Messages: 62 Registered: May 1993
|
Member |
|
|
Is there a way to check if events are pending?
I have a widget program that has a "play" mode, i.e. it continuously
updates using widget timer events (widget_control, wid, timer=1.0). I
do not want to update until all previous events created by an update
have been processed. During an update I use events as a natural way
for updating various top-level widget hierarchies. I want these
events and any cascading events they produce to be processed before
doing another application update.
I would like to be able to do something like:
pro event_handler, ev
case ev.id of
....
wid.timer: begin
if not widget_events_pending() then begin
;; perform update task
endif
;; queue next update check
widget_control, wid.timer, timer=.25
end
....
endcase
return
end
I could just increase the timer value, but the required value depends
on the load of the machine and network and the complexity of
computations in processing the pending events. Instead, I would like
to do an application update as soon as all the previous events have
cleared.
Thanks for any suggestions that you may have.
Chris
--
===============================
Bldg 24-E188
The Applied Physics Laboratory
The Johns Hopkins University
Laurel, MD 20723-6099
(301)953-6000 x8529
chris.chase@jhuapl.edu
|
|
|