Changeset 13477


Ignore:
Timestamp:
Mar 3, 2010, 10:01:10 PM (10 years ago)
Author:
rme
Message:

In #/windowWillClose: on hemlock-editor-window-controller, try to
guard against an apparent Cocotron bug that involves a window controller
still getting windowWillClose notifications for windows it's not a
delegate for.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/cocoa-ide/cocoa-editor.lisp

    r13439 r13477  
    24132413  ;; The echo area "document" should probably be a slot in the document
    24142414  ;; object, and released when the document object is.
    2415   (let* ((w (#/window wc))
    2416          (buf (hemlock-frame-echo-area-buffer w))
    2417          (echo-doc (if buf (hi::buffer-document buf))))
    2418     (when echo-doc
    2419       (setf (hemlock-frame-echo-area-buffer w) nil)
    2420       (#/close echo-doc))
    2421     (#/setFrameAutosaveName: w #@"")
    2422     (#/autorelease w)))
     2415  (let* ((w (#/window wc)))
     2416    ;; guard against cocotron lossage
     2417    (if (#/isKindOfClass: w hemlock-frame)
     2418      (let* ((buf (hemlock-frame-echo-area-buffer w))
     2419             (echo-doc (if buf (hi::buffer-document buf))))
     2420        (when echo-doc
     2421          (setf (hemlock-frame-echo-area-buffer w) nil)
     2422          (#/close echo-doc))
     2423        (#/setFrameAutosaveName: w #@"")
     2424        #+cocotron
     2425        (#/removeObserver: (#/defaultCenter ns:ns-notification-center) wc)
     2426        (#/autorelease w))
     2427      (#_NSLog #@"window controller %@ got windowWillClose for odd window %@ "
     2428               :address wc :address w))))
    24232429
    24242430(defmethod hemlock-view ((self hemlock-editor-window-controller))
Note: See TracChangeset for help on using the changeset viewer.