Fix PDFKit demo
parent
dc3f4b2efb
commit
ecf9010f6d
|
@ -6,7 +6,7 @@ objc-NSObject objc-NSWindow objc-PDFDocument objc-PDFView ;
|
||||||
|
|
||||||
: <PDFDocument> ( url -- document )
|
: <PDFDocument> ( url -- document )
|
||||||
<CFURL> [autorelease]
|
<CFURL> [autorelease]
|
||||||
PDFDocument swap [initWithURL:] [autorelease] ;
|
PDFDocument [alloc] swap [initWithURL:] [autorelease] ;
|
||||||
|
|
||||||
: <PDFView> ( document -- view )
|
: <PDFView> ( document -- view )
|
||||||
PDFView [alloc] 0 0 500 500 <NSRect> [initWithFrame:]
|
PDFView [alloc] 0 0 500 500 <NSRect> [initWithFrame:]
|
||||||
|
|
|
@ -25,7 +25,6 @@ objc-NSAutoreleasePool objc-NSObject threads ;
|
||||||
|
|
||||||
: event-loop ( -- )
|
: event-loop ( -- )
|
||||||
\ NSApplication get expired? [
|
\ NSApplication get expired? [
|
||||||
drop
|
|
||||||
NSApplication [sharedApplication]
|
NSApplication [sharedApplication]
|
||||||
\ NSApplication set-global
|
\ NSApplication set-global
|
||||||
[ (event-loop) ] in-thread
|
[ (event-loop) ] in-thread
|
||||||
|
|
Loading…
Reference in New Issue