Changeset 7613


Ignore:
Timestamp:
Nov 8, 2007, 6:43:54 PM (14 years ago)
Author:
rme
Message:

Simplify definition of hemlock-document-controller class.

File:
1 edited

Legend:

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

    r7606 r7613  
    26902690  (:metaclass ns:+ns-object))
    26912691
    2692 (defloadvar *hemlock-document-controller* nil "Shared document controller")
    2693 
    2694 (objc:defmethod #/sharedDocumentController ((self +hemlock-document-controller))
    2695   (or *hemlock-document-controller*
    2696       (setq *hemlock-document-controller* (#/init (#/alloc self)))))
    2697 
    26982692(objc:defmethod #/init ((self hemlock-document-controller))
    2699   (if *hemlock-document-controller*
    2700     (progn
    2701       (#/release self)
    2702       *hemlock-document-controller*)
    2703     (prog1
    2704       (setq *hemlock-document-controller* (call-next-method))
    2705       (setf (slot-value *hemlock-document-controller* 'last-encoding) 0))))
     2693  (prog1
     2694      (call-next-method)
     2695    (setf (slot-value self 'last-encoding) 0)))
    27062696
    27072697(defun iana-charset-name-of-nsstringencoding (ns)
     
    27872777
    27882778(defun initialize-user-interface ()
    2789   (#/sharedDocumentController hemlock-document-controller)
     2779  ;; The first created instance of an NSDocumentController (or
     2780  ;; subclass thereof) becomes the shared document controller.  So it
     2781  ;; may look like we're dropping this instance on the floor, but
     2782  ;; we're really not.
     2783  (make-instance 'hemlock-document-controller)
    27902784  ;(#/sharedPanel lisp-preferences-panel)
    27912785  (make-editor-style-map))
Note: See TracChangeset for help on using the changeset viewer.