[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Suicidal windows
- To: info-mcl@digitool.com
- Subject: Re: Suicidal windows
- From: Dimitri Simos <dim@lissys.demon.co.uk>
- Date: Tue, 25 Apr 1995 13:48:45 +0000
- Cc: angus@aegypt.demon.co.uk
- Sender: owner-info-mcl@digitool.com
Thanks to all the folks that replied to this question.
I'm now using the following suggestion by Angus McIntyre (very
similar to that of Pete Halverson):
(defclass tempo-window (window)
((closing-p :initform NIL)))
(defmethod view-deactivate-event-handler :around
((W tempo-window))
(call-next-method)
(unless (slot-value W 'closing-p)
(setf (slot-value W 'closing-p) T)
(window-close W)))
Thanks Angus, this works as required when the window gets covered,
however, if the close box is clicked or the 'close' menu-item is used,
the following error appeared:
> Error: Attempt to nullify an already null view wptr
> While executing: #<standard-method remove-view-from-window :after
>(simple-view)>
So, with a bit of guesswork I've now also added the following:
(defmethod window-close :around
((W tempo-window))
(setf (slot-value W 'closing-p) t)
(call-next-method))
..and everything now seems OK.
Cheers!
--
Dimitri Simos dim@lissys.demon.co.uk
___________________________________________________________________
Lissys Ltd. Tel.(Voice & Fax): UK (+44) 1509 235620