Paste: range-model-tie
Author: | dharmatech |
Mode: | factor |
Date: | Fri, 5 Dec 2008 03:22:52 |
Plain Text |
USING: kernel accessors locals models inverse ;
IN: range-model-tie
TUPLE: <range-model-tie> a b quot ;
M:: <range-model-tie> model-changed ( MODEL LINK -- )
LINK a>> MODEL =
[
LINK a>> range-value
LINK quot>> call
LINK b>>
set-range-value
]
[
LINK b>> range-value
LINK quot>> undo
LINK a>>
set-range-value
]
if ;
:: range-model-tie ( A B QUOT -- )
[let | TIE [ A B QUOT <range-model-tie> boa ] |
TIE A add-connection
TIE B add-connection ] ;
New Annotation