Re: Disappearing Window?

Scott Raney ((no email))
Sun, 20 Nov 94 12:41:45 MST

>
> Hello.
>
> This is seemingly simple but given the few minutes I have spent it has
> eluded me so far--
>
> I would like to create a stack which shows itself (just a small window
> with some text), (easy) , goes away when I click on it (no problem)
> but ALSO goes away if I leave it alone for some time period. And
> I don't want this routine to be using up CPU resources so don't
> want to write any sort of idle loop.
>
> The second two seem to be self-defeating. That is I can set MouseUp or the
> like to kill the window, and use a WAIT for a timer, but then during the
> timeout the MouseUp is handled.
>
> Any ideas? Can I do this without a continuously running loop?

No, but you can greatly reduce the amount of CPU time used by setting
the idleRate property to a larger value. Note that setting the idle
rate will affect things like the cursor repeat rate and the autoscroll
rate of fields. The amount of CPU usage at the default value of 200
milliseconds (5 times a second) is pretty minimal, however, and it's
probably not worth messing with unless this is a window that you're
going to be leaving up for very long periods of time (days or weeks).
The only other good reason I can think of for turning down the
idleRate would be if you've got a low memory system and you want to
reduce swapping as much as you possibly can while still allowing the
use of idle handlers.

The elegant way to solve your problem would be to have a command that
takes a handler name and a time, and MetaCard would call the handler
at that time. An "at" command is on the wish list for 2.0 which would
do exactly this.
Scott

> Stan Bischof
> HPSC
>

-- 
***********************************************************************
* Scott Raney  303-447-3936            Remember: the better you look, *
* raney@metacard.com                   the more you'll see -- Lidia   *
***********************************************************************