Handbook
Glossary
add-connection ( observer model -- )
Models
Prev:
<model> ( value -- model )
Next:
remove-connection ( observer model -- )
Vocabulary
models
Inputs
observer
an
object
model
a
model
Outputs
None
Generic word contract
Registers an object interested in being notified of changes to the model's value. When the value is changed as a result of a call to
set-model
, the
model-changed
word is called on the observer.
See also
remove-connection
,
model-changed
Definition
USING:
accessors
kernel
sequences
;
IN:
models
:
add-connection
( observer model -- )
dup
connections>>
[
empty?
[
activate-model
]
[
drop
]
if
]
[
push
]
bi
;