db4
Slava Pestov 2008-05-08 17:04:14 -05:00
parent 84924645ad
commit 2f4571312f
2 changed files with 6 additions and 4 deletions

View File

@ -29,9 +29,6 @@ IN: cocoa.application
: do-event ( app -- ? )
dup next-event [ -> sendEvent: t ] [ drop f ] if* ;
: do-events ( app -- )
dup do-event [ do-events ] [ drop ] if ;
: add-observer ( observer selector name object -- )
>r >r >r >r NSNotificationCenter -> defaultCenter
r> r> sel_registerName

View File

@ -15,7 +15,12 @@ C: <handle> handle
SINGLETON: cocoa-ui-backend
M: cocoa-ui-backend do-events ( -- )
[ [ NSApp do-events ui-wait ] ui-try ] with-autorelease-pool ;
[
[
NSApp [ dup do-event ] [ ] [ ] while drop
ui-wait
] ui-try
] with-autorelease-pool ;
TUPLE: pasteboard handle ;