Re: Disappearing Window?
bechard (starnet!apple!mpr.ca!bechard)
Wed, 23 Nov 1994 16:03:40 -0800 (PST)
>
> 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
>
>
>
>
If you're using MetaCard under UNIX, I would think that the easiest way would
be to use an alarm signal. Try "man sigvec" for information.
Hope this helps,
Dan
----------------------------------------------------------------------
I have spoken.
======================================================================
Dan Bechard "There's too much urinary freedom in this world!"
MPR Teltech Ltd. - Jerry Seinfeld
Burnaby, B.C.
======================================================================