comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: event queue
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: event queue [message #37483] Tue, 23 December 2003 07:58
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
lyubo writes:

> Is it possible to check the event queue for a particular event?
>
> For example:
>
> while (1) do begin
> if the event has occurred exit
> ..........
> end

Yes, it is possible. Here is the method I use in my ProgressBar
object to check to see if the user has clicked the CANCEL
button or not:

FUNCTION PROGRESSBAR::CheckCancel

; This method checks for a CANCEL Button event. It returns 1
; if an event has occurred and 0 otherwise.

; Check for a CANCEL button event.

IF Widget_Info(self.cancelID, /Valid_ID) THEN BEGIN
event = Widget_Event(self.cancelID, /NoWait)
name = Tag_Names(event, /Structure_Name)
IF name EQ 'WIDGET_BUTTON' THEN self.cancelFlag = 1
ENDIF

RETURN, self.cancelFlag
END

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL vs JAVA/JAI
Next Topic: event queue

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Mon Dec 01 12:41:23 PST 2025

Total time taken to generate the page: 0.96263 seconds