Changeset 15166


Ignore:
Timestamp:
Jan 21, 2012, 4:53:53 PM (8 years ago)
Author:
gz
Message:

top-listener-process convenience function

Location:
trunk/source/cocoa-ide
Files:
2 edited

Legend:

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

    r14904 r15166  
    211211    (when filename
    212212      (#/ensureListener: self nil)
    213       (let* ((doc (#/topListener hemlock-listener-document))
    214              (process (hemlock-document-process doc)))
     213      (let ((process (top-listener-process)))
    215214        (process-interrupt process #'(lambda ()
    216215                                       (load filename)
     
    224223    (when filename
    225224      (#/ensureListener: self nil)
    226       (let* ((doc (#/topListener hemlock-listener-document))
    227              (process (hemlock-document-process doc)))
     225      (let ((process (top-listener-process)))
    228226        (process-interrupt process #'(lambda ()
    229227                                       (compile-file filename)
  • trunk/source/cocoa-ide/cocoa-listener.lisp

    r15116 r15166  
    398398    (unless (%null-ptr-p doc) doc)))
    399399
     400(defun top-listener-process ()
     401  (let* ((doc (#/topListener hemlock-listener-document)))
     402    (unless (%null-ptr-p doc)
     403      (hemlock-document-process doc))))
     404
    400405
    401406(defun symbol-value-in-top-listener-process (symbol)
    402   (let* ((process (hemlock-document-process (#/topListener hemlock-listener-document))))
     407  (let* ((process (top-listener-process)))
    403408     (if process
    404409       (ignore-errors (symbol-value-in-process symbol process))
     
    406411 
    407412(defun hemlock-ext:top-listener-output-stream ()
    408   (let* ((process (hemlock-document-process (#/topListener hemlock-listener-document))))
     413  (let* ((process (top-listener-process)))
    409414    (when process
    410415      (setq process (require-type process 'cocoa-listener-process))
     
    412417
    413418(defun hemlock-ext:top-listener-input-stream ()
    414   (let* ((process (hemlock-document-process (#/topListener hemlock-listener-document))))
     419  (let* ((process (top-listener-process)))
    415420    (when process
    416421      (setq process (require-type process 'cocoa-listener-process))
     
    549554                      (< range-end prot-end)))))
    550555      t)))
    551    
    552    
     556
     557
    553558;;; Action methods
    554559(objc:defmethod (#/interrupt: :void) ((self hemlock-listener-document) sender)
     
    700705   +null-ptr+
    701706   #$YES)
    702   (hemlock-document-process (#/topListener hemlock-listener-document)))
     707  (top-listener-process))
    703708
    704709(defmethod ui-object-eval-selection ((app ns:ns-application)
Note: See TracChangeset for help on using the changeset viewer.