Cocoa fixes
parent
2da8509134
commit
c17640f982
|
@ -58,8 +58,9 @@ SYMBOL: super-sent-messages
|
||||||
"NSSavePanel"
|
"NSSavePanel"
|
||||||
"NSView"
|
"NSView"
|
||||||
"NSWindow"
|
"NSWindow"
|
||||||
|
"NSWorkspace"
|
||||||
} [
|
} [
|
||||||
f import-objc-class
|
[ ] import-objc-class
|
||||||
] each
|
] each
|
||||||
|
|
||||||
: <NSString> ( str -- alien ) <CFString> -> autorelease ;
|
: <NSString> ( str -- alien ) <CFString> -> autorelease ;
|
||||||
|
|
|
@ -4,7 +4,7 @@ USING: alien alien.c-types alien.compiler
|
||||||
arrays assocs combinators compiler inference.transforms kernel
|
arrays assocs combinators compiler inference.transforms kernel
|
||||||
math namespaces parser prettyprint prettyprint.sections
|
math namespaces parser prettyprint prettyprint.sections
|
||||||
quotations sequences strings words cocoa.runtime io macros
|
quotations sequences strings words cocoa.runtime io macros
|
||||||
memoize ;
|
memoize debugger ;
|
||||||
IN: cocoa.messages
|
IN: cocoa.messages
|
||||||
|
|
||||||
: make-sender ( method function -- quot )
|
: make-sender ( method function -- quot )
|
||||||
|
@ -201,8 +201,11 @@ H{
|
||||||
: import-objc-class ( name quot -- )
|
: import-objc-class ( name quot -- )
|
||||||
2dup unless-defined
|
2dup unless-defined
|
||||||
dupd define-objc-class-word
|
dupd define-objc-class-word
|
||||||
dup objc-class register-objc-methods
|
[
|
||||||
objc-meta-class register-objc-methods ;
|
dup
|
||||||
|
objc-class register-objc-methods
|
||||||
|
objc-meta-class register-objc-methods
|
||||||
|
] curry try ;
|
||||||
|
|
||||||
: root-class ( class -- root )
|
: root-class ( class -- root )
|
||||||
dup objc-class-super-class [ root-class ] [ ] ?if ;
|
dup objc-class-super-class [ root-class ] [ ] ?if ;
|
||||||
|
|
Loading…
Reference in New Issue