Changeset 5911
- Timestamp:
- Feb 13, 2007, 5:07:49 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ccl/examples/cocoa-window.lisp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/examples/cocoa-window.lisp
r5886 r5911 167 167 (defun run-event-loop () 168 168 (%set-toplevel nil) 169 (change-class *cocoa-event-process* 'appkit-process) 169 170 (let* ((app *NSApp*)) 170 171 (loop … … 172 173 (error (c) (nslog-condition c))) 173 174 (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 187 178 188 179 (defun start-cocoa-application (&key
Note:
See TracChangeset
for help on using the changeset viewer.
