]> gitweb.factorcode.org Git - factor.git/blob - basis/cocoa/application/application-docs.factor
Create basis vocab root
[factor.git] / basis / cocoa / application / application-docs.factor
1 USING: debugger quotations help.markup help.syntax strings alien
2 core-foundation ;
3 IN: cocoa.application
4
5 HELP: <NSString>
6 { $values { "str" string } { "alien" alien } }
7 { $description "Allocates an autoreleased " { $snippet "CFString" } "." } ;
8
9 { <NSString> <CFString> CF>string } related-words
10
11 HELP: <NSArray>
12 { $values { "seq" "a sequence of " { $link alien } " instances" } { "alien" alien } }
13 { $description "Allocates an autoreleased " { $snippet "CFArray" } "." } ;
14
15 { <NSArray> <CFArray> } related-words
16
17 HELP: with-autorelease-pool
18 { $values { "quot" quotation } }
19 { $description "Sets up a new " { $snippet "NSAutoreleasePool"  } ", calls the quotation and frees the pool." } ;
20
21 HELP: NSApp
22 { $values { "app" "an " { $snippet "NSApplication" } } }
23 { $description "Pushes the current " { $snippet "NSApplication" } " singleton." } ;
24
25 HELP: with-cocoa
26 { $values { "quot" quotation } }
27 { $description "Sets up an autorelease pool, initializes the " { $snippet "NSApplication" } " singleton, and calls the quotation." } ;
28
29 HELP: do-event
30 { $values { "app" "an " { $snippet "NSApplication" } } { "?" "a boolean" } }
31 { $description "Processes a pending event in the queue, if any, returning a boolean indicating if there was one. Does not block." } ;
32
33 HELP: add-observer
34 { $values { "observer" "an " { $snippet "NSObject" } } { "selector" string } { "name" "an " { $snippet "NSString" } } { "object" "an " { $snippet "NSObject" } } }
35 { $description "Registers an observer with the " { $snippet "NSNotificationCenter" } " singleton." } ;
36
37 HELP: remove-observer
38 { $values { "observer" "an " { $snippet "NSObject" } } }
39 { $description "Unregisters an observer from the " { $snippet "NSNotificationCenter" } " singleton." } ;
40
41 HELP: install-delegate
42 { $values { "receiver" "an " { $snippet "NSObject" } } { "delegate" "an Objective C class" } }
43 { $description "Sets the receiver's delegate to a new instance of the delegate class." } ;
44
45 HELP: objc-error
46 { $error-description "Thrown by the Objective C runtime when an error occurs, for example, sending a message to an object with an unrecognized selector." } ;
47
48 ARTICLE: "cocoa-application-utils" "Cocoa application utilities"
49 { $subsection NSApp }
50 { $subsection with-autorelease-pool }
51 { $subsection with-cocoa }
52 { $subsection do-event }
53 { $subsection add-observer }
54 { $subsection remove-observer }
55 { $subsection install-delegate } ;
56
57 IN: cocoa.application
58 ABOUT: "cocoa-application-utils"