]> gitweb.factorcode.org Git - factor.git/blob - basis/models/arrow/arrow-docs.factor
core, basis, extra: Remove DOS line endings from files.
[factor.git] / basis / models / arrow / arrow-docs.factor
1 USING: help.syntax help.markup kernel math classes classes.tuple
2 calendar models ;
3 IN: models.arrow
4
5 HELP: arrow
6 { $class-description "Arrow model values are computed by applying a quotation to the value of another model. Arrows are automatically updated when the underlying model changes. Arrows are constructed by " { $link <arrow> } "." }
7 { $examples
8     "The following code displays a label showing the result of applying " { $link sq } " to the value 5:"
9     { $code
10         "USING: models ui.gadgets.labels ui.gadgets.panes ;"
11         "5 <model> [ sq ] <arrow> [ number>string ] <arrow>"
12         "<label-control> gadget."
13     }
14     "An exercise for the reader is to keep the original model around on the stack, and change its value to 6, observing that the label will immediately display 36."
15 } ;
16
17 HELP: <arrow>
18 { $values { "model" model } { "quot" { $quotation ( obj -- newobj ) } } { "arrow" "a new " { $link arrow } } }
19 { $description "Creates a new instance of " { $link arrow } ". The value of the new arrow model is computed by applying the quotation to the value." }
20 { $examples "See the example in the documentation for " { $link arrow } "." } ;
21
22 ARTICLE: "models.arrow" "Arrow models"
23 "Arrow model values are computed by applying a quotation to the value of another model."
24 { $subsections
25     arrow
26     <arrow>
27 } ;
28
29 ABOUT: "models.arrow"