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

Home » Public Forums » archive » Re: time generated event
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: time generated event [message #34687] Mon, 07 April 2003 10:21
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Lauren (lejardi@sandia.gov) writes:

> Thanks. Now the only problem I am having is killing the TIMER event
> after the timer has started to count down. I tried widget_control,
> top, /CLEAR_EVENTS but it does not seem to work. Is there another
> option?

Oh, right, you want to turn it OFF, too. :-)

Typically, we keep some kind of a timer flag in the info
structure. We turn the flag on when we start the timer:

info.timer_flag = 1
IF info.timer_flag THEN Widget_Control, info.tID, Timer=0.5

Then, if we hit the STOP button (or whatever it is that is
suppose to stop the timer) then we do something like this:

info.timer_flag = 0
Widget_Control, info.tID, /Clear_Events

In this way, the next timer event cannot get generated.

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
Re: time generated event [message #34689 is a reply to message #34687] Mon, 07 April 2003 10:09 Go to previous message
lejardi is currently offline  lejardi
Messages: 3
Registered: April 2003
Junior Member
David Fanning <david@dfanning.com> wrote in message news:<MPG.18f7a5a76cf6ff4989b35@news.frii.com>...
> Lauren (lejardi@sandia.gov) writes:
>
>> I know that events can be generated when a button is pushed or
>> toggled. However, I need an event to be generated after given time
>> interval. Is there anyway to do this in IDL? I need the clock that is
>> counting down to the event to be non-blocking.
>
> You are looking for a TIMER event. See the TIMER keyword
> to WIDGET_CONTROL.
>
> Cheers,
>
> David

Thanks. Now the only problem I am having is killing the TIMER event
after the timer has started to count down. I tried widget_control,
top, /CLEAR_EVENTS but it does not seem to work. Is there another
option?
Re: time generated event [message #34702 is a reply to message #34689] Fri, 04 April 2003 13:23 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Lauren (lejardi@sandia.gov) writes:

> I know that events can be generated when a button is pushed or
> toggled. However, I need an event to be generated after given time
> interval. Is there anyway to do this in IDL? I need the clock that is
> counting down to the event to be non-blocking.

You are looking for a TIMER event. See the TIMER keyword
to WIDGET_CONTROL.

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 5.6 error message
Next Topic: Reading gzip compressed files with SOCKET?

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

Current Time: Wed Oct 08 10:58:11 PDT 2025

Total time taken to generate the page: 0.00477 seconds