Changeset 5911


Ignore:
Timestamp:
Feb 13, 2007, 5:07:49 PM (18 years ago)
Author:
Gary Byers
Message:

Don't change-class *cocoa-event-process* until we start to run the event
loop.

Don't do _deallocHardCore: explicitly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/examples/cocoa-window.lisp

    r5886 r5911  
    167167(defun run-event-loop ()
    168168  (%set-toplevel nil)
     169  (change-class *cocoa-event-process* 'appkit-process)
    169170  (let* ((app *NSApp*))
    170171    (loop
     
    172173          (error (c) (nslog-condition c)))
    173174        (unless (send app 'is-running)
    174           (return)))
    175     ;; This is a little funky (OK, it's a -lot- funky.) The
    176     ;; -[NSApplication _deallocHardCore:] method wants an autorelease
    177     ;; pool to be established when it's called, but one of the things
    178     ;; that it does is to release all autorelease pools.  So, we create
    179     ;; one, but don't worry about freeing it ...
    180     #+apple-objc
    181     (progn
    182       (create-autorelease-pool)
    183       (objc-message-send app "_deallocHardCore:" :<BOOL> #$YES :void))))
    184 
    185 
    186 (change-class *cocoa-event-process* 'appkit-process)
     175          (return)))))
     176
     177
    187178
    188179(defun start-cocoa-application (&key
Note: See TracChangeset for help on using the changeset viewer.