8.16.0.4
1 Observables
class | ||||
| ||||
| ||||
annotation | ||||
| ||||
| ||||
annotation | ||||
|
The annotation Obs.of(annot) is satisfied by an annotation whose current value satisfies annot. The annotation MaybeObs.of(annot) is satisfied by a value that satisfies either annot or Obs.of(annot).
Returns a Racket object that corresponds to the observable for use
directly with racket/gui/easy.
Returns the value via Obs.peek (which you shouldn’t normally
do) or updates the value via Obs.update (ignoring the current
value).
Adds f as a function to be called when the value of
obs changes.
Removes f as a function to be called when the value of
obs changes.
method | ||
| ||
operator | ||
Changes the value v of obs to
f(v). Returns the new value.
Returns the current value of obs.
Normally, instead of peeking an observable’s value, you should either register an observer or pass an observer to a constructor that expects one. For example, when an observer’s value should affect drawing in a Canvas, then the first argument to Canvas should the observer (or one derived from it), and then a rendered canvas will be updated when the observable changes.
Returns an observer like obs, but named as name.
method | ||
| ||
operator | ||
Returns an observer whose value changes each time that obs’s
value changes, where the new observer’s value is changed to
f(v) when obs is changed to
v.
Returns a new observable whose value changes to the value of
obs when there is at least a msec millisecond pause
in changes to obs.
Returns a new observable whose value changes to the value of
obs at most once per msec milliseconds.
function | ||
| ||
function | ||
|