1 USING: help.syntax help.markup kernel math classes classes.tuple
\r
6 { $class-description "Filter model values are computed by applying a quotation to the value of another model. Filters are automatically updated when the underlying model changes. Filters are constructed by " { $link <filter> } "." }
\r
8 "The following code displays a label showing the result of applying " { $link sq } " to the value 5:"
\r
10 "USING: models ui.gadgets.labels ui.gadgets.panes ;"
\r
11 "5 <model> [ sq ] <filter> [ number>string ] <filter>"
\r
12 "<label-control> gadget."
\r
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."
\r
18 { $values { "model" model } { "quot" "a quotation with stack effect " { $snippet "( obj -- newobj )" } } { "filter" "a new " { $link filter } } }
\r
19 { $description "Creates a new instance of " { $link filter } ". The value of the new filter model is computed by applying the quotation to the value." }
\r
20 { $examples "See the example in the documentation for " { $link filter } "." } ;
\r
22 ARTICLE: "models-filter" "Filter models"
\r
23 "Filter model values are computed by applying a quotation to the value of another model."
\r
24 { $subsection filter }
\r
25 { $subsection <filter> } ;
\r
27 ABOUT: "models-filter"
\r