i are good at the facterz. let me show u
parent
3c42ef1da6
commit
3958798934
|
@ -107,7 +107,9 @@ USE: prettyprint
|
||||||
. dup . ;
|
. dup . ;
|
||||||
|
|
||||||
: method-arg-type ( method i -- type )
|
: method-arg-type ( method i -- type )
|
||||||
method_copyArgumentType [ ascii alien>string ] keep (free) ;
|
method_copyArgumentType
|
||||||
|
[ ascii alien>string parse-objc-type ] keep
|
||||||
|
(free) ;
|
||||||
|
|
||||||
SYMBOL: objc>alien-types
|
SYMBOL: objc>alien-types
|
||||||
|
|
||||||
|
@ -164,10 +166,12 @@ H{
|
||||||
|
|
||||||
: method-arg-types ( method -- args )
|
: method-arg-types ( method -- args )
|
||||||
dup method_getNumberOfArguments
|
dup method_getNumberOfArguments
|
||||||
[ method-arg-type parse-objc-type ] with map ;
|
[ method-arg-type ] with map ;
|
||||||
|
|
||||||
: method-return-type ( method -- ctype )
|
: method-return-type ( method -- ctype )
|
||||||
method_copyReturnType [ ascii alien>string ] keep (free) ;
|
method_copyReturnType
|
||||||
|
[ ascii alien>string parse-objc-type ] keep
|
||||||
|
(free) ;
|
||||||
|
|
||||||
: register-objc-method ( method -- )
|
: register-objc-method ( method -- )
|
||||||
dup method-return-type over method-arg-types 2array
|
dup method-return-type over method-arg-types 2array
|
||||||
|
|
|
@ -57,7 +57,7 @@ IN: cocoa.subclassing
|
||||||
|
|
||||||
: redefine-objc-methods ( imeth name -- )
|
: redefine-objc-methods ( imeth name -- )
|
||||||
dup class-exists? [
|
dup class-exists? [
|
||||||
objc_getClass swap [ (redefine-objc-method) ] with map
|
objc_getClass swap [ (redefine-objc-method) ] with each
|
||||||
] [
|
] [
|
||||||
2drop
|
2drop
|
||||||
] if ;
|
] if ;
|
||||||
|
|
Loading…
Reference in New Issue