]> gitweb.factorcode.org Git - factor.git/blob - basis/cocoa/application/application-docs.factor
Change a throw to rethrow so that we don't lose the original stack trace
[factor.git] / basis / cocoa / application / application-docs.factor
1 USING: debugger quotations help.markup help.syntax strings alien
2 core-foundation core-foundation.strings core-foundation.arrays ;
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: cocoa-app
30 { $values { "quot" quotation } }
31 { $description "Initializes Cocoa, calls the quotation, and starts the Cocoa event loop." } ;
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 "Utilities:"
50 { $subsection NSApp }
51 { $subsection add-observer }
52 { $subsection remove-observer }
53 { $subsection install-delegate }
54 "Combinators:"
55 { $subsection cocoa-app }
56 { $subsection with-autorelease-pool }
57 { $subsection with-cocoa } ;
58
59 IN: cocoa.application
60 ABOUT: "cocoa-application-utils"