diff --git a/basis/cocoa/subclassing/subclassing.factor b/basis/cocoa/subclassing/subclassing.factor index ec15c0b514..fd18c7fa89 100755 --- a/basis/cocoa/subclassing/subclassing.factor +++ b/basis/cocoa/subclassing/subclassing.factor @@ -9,17 +9,20 @@ IN: cocoa.subclassing : init-method ( method -- sel imp types ) first3 swap - [ sel_registerName ] [ execute ] [ ascii string>alien ] ; + [ sel_registerName ] [ execute ] [ ascii string>alien ] + tri* ; : throw-if-false ( YES/NO -- ) - zero? [ "Failed to add method or protocol to class" throw ] when ; + zero? [ "Failed to add method or protocol to class" throw ] + when ; : add-methods ( methods class -- ) swap [ init-method class_addMethod throw-if-false ] with each ; : add-protocols ( protocols class -- ) - swap [ objc-protocol class_addProtocol throw-if-false ] with each ; + swap [ objc-protocol class_addProtocol throw-if-false ] + with each ; : (define-objc-class) ( protocols superclass name imeth -- ) -rot