2 USING: cocoa cocoa.messages cocoa.subclassing cocoa.types
3 compiler kernel namespaces cocoa.classes tools.test memory
7 { +superclass+ "NSObject" }
12 { "id" "SEL" "NSRect" }
18 dup 1.0 2.0 101.0 102.0 <NSRect> -> foo:
23 [ 1.0 ] [ "x" get NSRect-x ] unit-test
24 [ 2.0 ] [ "x" get NSRect-y ] unit-test
25 [ 101.0 ] [ "x" get NSRect-w ] unit-test
26 [ 102.0 ] [ "x" get NSRect-h ] unit-test
29 { +superclass+ "NSObject" }
35 [ 2drop test-foo "x" get ]
44 [ 1.0 ] [ "x" get NSRect-x ] unit-test
45 [ 2.0 ] [ "x" get NSRect-y ] unit-test
46 [ 101.0 ] [ "x" get NSRect-w ] unit-test
47 [ 102.0 ] [ "x" get NSRect-h ] unit-test
49 ! Make sure that we can add methods
51 { +superclass+ "NSObject" }
57 [ 2drop test-foo "x" get ]