product
Models ยป Product models

Next:<product> ( models -- product )


Vocabulary
models.product

Class description
Product model values are computed by collecting the values from a sequence of underlying models into a new sequence. Product models are automatically updated when underlying models change. Product models are constructed by <product>.

A product model whose children are all Range models conforms to the Range model protocol and represents a point in n-dimensional space which is bounded by a rectangle.

Examples
The following code displays a pair of sliders, and an updating label showing their current values:
USING: models models.product models.range ui.gadgets ui.gadgets.labels ui.gadgets.packs ui.gadgets.panes ui.gadgets.sliders ; : <funny-model> ( -- model ) 0 10 0 100 1 <range> ; : <funny-slider> ( model -- slider ) horizontal <slider> ; <funny-model> <funny-model> 2array [ <pile> [ horizontal <slider> add-gadget ] reduce gadget. ] [ <product> [ unparse ] <arrow> <label-control> gadget. ] bi


Definition


Methods