]> gitweb.factorcode.org Git - factor.git/blob - basis/tools/deploy/test/14/14.factor
Merge branch 'master' of git://factorcode.org/git/factor
[factor.git] / basis / tools / deploy / test / 14 / 14.factor
1 ! Copyright (C) 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors classes.struct cocoa cocoa.classes
4 cocoa.subclassing core-graphics.types kernel math ;
5 IN: tools.deploy.test.14
6
7 CLASS: {
8     { +superclass+ "NSObject" }
9     { +name+ "Bar" }
10 } {
11     "bar:"
12     "float"
13     { "id" "SEL" "NSRect" }
14     [
15         [ origin>> [ x>> ] [ y>> ] bi + ]
16         [ size>> [ w>> ] [ h>> ] bi + ]
17         bi +
18     ]
19 } ;
20
21 : main ( -- )
22     Bar -> alloc -> init
23     S{ CGRect f S{ CGPoint f 1.0 2.0 } S{ CGSize f 3.0 4.0 } } -> bar:
24     10.0 assert= ;
25
26 MAIN: main