factor/basis/cocoa/cocoa-docs.factor

62 lines
2.3 KiB
Factor
Raw Normal View History

USING: cocoa.messages help.markup help.syntax strings
2007-09-20 18:09:08 -04:00
alien core-foundation ;
IN: cocoa
2007-09-20 18:09:08 -04:00
HELP: \send:
{ $syntax "send: selector" }
2007-09-20 18:09:08 -04:00
{ $values { "selector" "an Objective C method name" } }
{ $description "A sugared form of the following:" }
{ $code "\"selector\" send" } ;
HELP: \super:
{ $syntax "super: selector" }
2007-09-20 18:09:08 -04:00
{ $values { "selector" "an Objective C method name" } }
{ $description "A sugared form of the following:" }
{ $code "\"selector\" send-super" } ;
{ send super-send postpone: \send: postpone: \super: } related-words
2007-09-20 18:09:08 -04:00
2017-08-26 18:52:34 -04:00
HELP: \IMPORT:
{ $syntax "IMPORT: name" }
{ $description "Makes an Objective C class available for use." }
{ $examples
{ $code "IMPORT: QTMovie" "QTMovie \"My Movie.mov\" <NSString> f send: \\movieWithFile:error:" }
} ;
2007-09-20 18:09:08 -04:00
ARTICLE: "objc-calling" "Calling Objective C code"
"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."
2017-08-26 18:52:34 -04:00
{ $subsections postpone: \IMPORT: }
"Every imported Objective C class has as corresponding class word in the " { $vocab-link "cocoa.classes" } " vocabulary. Class words push the class object in the stack, allowing class methods to be invoked."
2007-09-20 18:09:08 -04:00
$nl
"Messages can be sent to classes and instances using a pair of parsing words:"
{ $subsections
postpone: \send:
postpone: \super:
}
2007-09-20 18:09:08 -04:00
"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:"
{ $subsections
send
super-send
} ;
2007-09-20 18:09:08 -04:00
ARTICLE: "cocoa" "Cocoa bridge"
"The " { $vocab-link "cocoa" } " vocabulary implements a Factor-Cocoa bridge for Mac OS X (GNUstep is not supported)."
$nl
"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."
$nl
"On top of this, a dynamic message send facility is built:"
{ $subsections
"objc-calling"
"objc-subclassing"
}
2011-08-26 19:20:31 -04:00
"A utility library is built to facilitate the development of Cocoa applications in Factor:"
{ $subsections
"cocoa-application-utils"
"cocoa-dialogs"
"cocoa-pasteboard-utils"
"cocoa-view-utils"
"cocoa-window-utils"
} ;
ABOUT: "cocoa"