Vocabularymodels.delayClass descriptionDelay models have the same value as their underlying model, however the value only changes after a timer expires. If the underlying model's value changes again before the timer expires, the timer restarts. Delay models are constructed by
<delay>.
ExamplesThe following code displays a sliders and a label which is updated half a second after the slider stops changing:
USING: models models.delay models.arrow models.range
ui.gadgets ui.gadgets.labels ui.gadgets.sliders ui.gadgets.panes
math.parser calendar ;
: <funny-slider> ( -- slider )
0 10 0 100 <range> horizontal <slider> ;
<funny-slider> dup gadget.
model>> 1/2 seconds <delay> [ unparse ] <arrow>
<label-control> gadget.
DefinitionMethods