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

Home » Public Forums » archive » Re: Interrupting widget applications
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Interrupting widget applications [message #7940 is a reply to message #7922] Thu, 23 January 1997 00:00 Go to previous messageGo to previous message
hegde is currently offline  hegde
Messages: 17
Registered: December 1995
Junior Member
Thanks for your suggestion. Although it works for a simple for loop, this
type of implementation goes out of hand for multiple loops or recursive
operations. And if it is required to monitor within a time consuming loop,
I have to find another way.

My need is to have an interrupt button in the main application window and
it interrupt anything going on in other windows ( display windows, printer
gizmos etc., ).

So far the most convenient method I have found out is to monitor the event
queue with WIDGET_EVENT( interrupt button ) wherever the interrupt is desired
and proceed accordingly. Any suggestion is appreciated.

Thanks,

-M. Hegde
hegde@neptune.gsfc.nasa.gov

William Thompson (thompson@orpheus.nascom.nasa.gov) wrote:
: What you need to do is to break your application down into discrete events, and
: then use TIMER events to run the events in sequence. For example, if your
: program uses a FOR loop, then you could instead make each run through the loop
: a discrete event, and store the loop counter between events.
:
: For example, you might define your main base with a line like
:
: MAIN_BASE = WIDGET_BASE(TITLE='CDS FITS Generation Software', $
: /FRAME, /COLUMN, UVALUE='Timer')
:
: and then in the event handler you would have code that would read
:
: WIDGET_CONTROL, EV.ID, GET_UVALUE=VALUE
: IF VALUE EQ 'Timer' THEN BEGIN
: ... do one piece of the complete operation ...
:
: It's important to restart the timer after every timed event, to keep it going.
: What I like to do is to keep a parameter called RUNNING which can be either 0
: or 1. A start button generates an event which does some initial preparation
: (e.g. setting the loop counter to 0), and sets RUNNING=1. Then at the bottom
: of the event handler routine I put a line like
:
: IF RUNNING THEN WIDGET_CONTROL, MAIN_BASE, TIMER=0.1
:
: A stop button simply sets RUNNING=0.
:
: Bill

--
test
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: display many color images
Next Topic: Re: color buttons

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

Current Time: Sat Oct 11 14:03:42 PDT 2025

Total time taken to generate the page: 0.40220 seconds