Re: Disappearing Window?

Bradford Marx ((no email))
Wed, 23 Nov 1994 11:07:39 -0500 (EST)

On Sun, 20 Nov 1994, Stan Bischof wrote:

> 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?

One idea, though not maybe the most optimal, is to use a global variable.
If you have a global variable, you can store the time in the variable when
you open the stack and refer to that time in other handlers to see if a
certain amount of time has elapsed.

If you use the mouseUp or mouseDown handlers, you can also check the mouse
position before popping down the stack to see that you are inside the
boundaries of the stack.

> Stan Bischof
> HPSC