Update of /project/mcclim/cvsroot/mcclim In directory clnet:/tmp/cvs-serv9497
Modified Files: ports.lisp Log Message: Fix destroy-port in the case where the backend method causes an error. The work seems to be done using :before methods (why??) both in McCLIM and the backends. If one of these errs, the primary method which removes the port from *all-ports* never runs. Fix this by using an :around method with an unwind-protect to ensure removal from *all-ports*.
--- /project/mcclim/cvsroot/mcclim/ports.lisp 2006/04/17 18:40:27 1.52 +++ /project/mcclim/cvsroot/mcclim/ports.lisp 2006/07/01 21:31:41 1.53 @@ -230,8 +230,12 @@ nil)
(defmethod destroy-port ((port basic-port)) - (reset-watcher port :destroy) - (setf *all-ports* (remove port *all-ports*))) + (reset-watcher port :destroy)) + +(defmethod destroy-port :around ((port basic-port)) + (unwind-protect + (call-next-method) + (setf *all-ports* (remove port *all-ports*))))
(defmethod add-watcher ((port basic-port) watcher) (declare (ignore watcher))