[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Suicidal windows
- To: Dimitri Simos <dim@lissys.demon.co.uk>, info-mcl@digitool.com
- Subject: Re: Suicidal windows
- From: e@flavors.com (Doug Currie, Flavors Technology, Inc.)
- Date: Mon, 24 Apr 1995 11:06:07 -0400
- Sender: owner-info-mcl@digitool.com
At 8:40 PM 95.04.23, Dimitri Simos wrote:
>I'm trying to create a class of window that has a rather
>temporary existence: It must die if the user clicks on it
>or if it gets covered by any other window, thus becoming
>something other than the frontmost window.
>
>The first part is easy to do by defining a view-click-event-handler
>that calls window-close.
>
>The second one baffles me. OK, I have tried the 'obvious' one that
>doesn't work, and yes, it sends MCL into an infinite recursion:
>
>(defclass tempo-window (window) ())
>
>(defmethod view-deactivate-event-handler :around
> ((w tempo-window))
> (call-next-method)
> (window-close w))
>
>.....(Don't try it unless you enjoy the re-booting sound).
>
>Any ideas on how to do this properly would be appreciated. (at the
>moment I cheat by just moving the window off-screen ...yuk).
Have you tried: (eval-enqueue #'(lambda () (window-close w))) ?
e