1 USING: cocoa.messages help.markup help.syntax strings
2 alien core-foundation ;
6 { $syntax "-> selector" }
7 { $values { "selector" "an Objective C method name" } }
8 { $description "A sugared form of the following:" }
9 { $code "\"selector\" send" } ;
12 { $syntax "-> selector" }
13 { $values { "selector" "an Objective C method name" } }
14 { $description "A sugared form of the following:" }
15 { $code "\"selector\" send-super" } ;
17 { send super-send POSTPONE: -> POSTPONE: SUPER-> } related-words
19 ARTICLE: "objc-calling" "Calling Objective C code"
20 "Before an Objective C class can be used, it must be imported; by default, a small set of common classes are imported automatically, but additional classes can be imported as needed."
21 { $subsection import-objc-class }
22 "Every imported Objective C class has as corresponding class word in the " { $vocab-link "objc-classes" } " vocabulary. Class words push the class object in the stack, allowing class methods to be invoked."
24 "Messages can be sent to classes and instances using a pair of parsing words:"
25 { $subsection POSTPONE: -> }
26 { $subsection POSTPONE: SUPER-> }
27 "These parsing words are actually syntax sugar for a pair of ordinary words; they can be used instead of the parsing words if the selector name is dynamically computed:"
29 { $subsection super-send } ;
31 ARTICLE: "cocoa" "Cocoa bridge"
32 "The " { $vocab-link "cocoa" } " vocabulary implements a Factor-Cocoa bridge for Mac OS X (GNUstep is not supported)."
34 "The lowest layer uses the " { $link "alien" } " to define bindings for the various functions in Apple's Objective-C runtime. This is defined in the " { $vocab-link "cocoa.runtime" } " vocabulary."
36 "On top of this, a dynamic message send facility is built:"
37 { $subsection "objc-calling" }
38 { $subsection "objc-subclassing" }
39 "A utility library is built to faciliate the development of Cocoa applications in Factor:"
40 { $subsection "cocoa-types" }
41 { $subsection "cocoa-application-utils" }
42 { $subsection "cocoa-dialogs" }
43 { $subsection "cocoa-pasteboard-utils" }
44 { $subsection "cocoa-view-utils" }
45 { $subsection "cocoa-window-utils" } ;