models.illusion allows multiple refs for original
parent
38e8565555
commit
611b3638f4
|
@ -7,10 +7,6 @@ TUPLE: illusion < arrow ;
|
||||||
illusion new V{ } clone >>connections V{ } clone >>dependencies 0 >>ref
|
illusion new V{ } clone >>connections V{ } clone >>dependencies 0 >>ref
|
||||||
swap >>quot over >>model [ add-dependency ] keep ;
|
swap >>quot over >>model [ add-dependency ] keep ;
|
||||||
|
|
||||||
: backtalk ( value object -- ) [ quot>> [undo] call( a -- b ) ] [ model>> ] bi (>>value) ;
|
: backtalk ( value object -- ) [ quot>> [undo] call( a -- b ) ] [ model>> ] bi set-model ;
|
||||||
|
|
||||||
IN: accessors
|
M: illusion update-model ( model -- ) [ [ value>> ] keep backtalk ] with-locked-model ;
|
||||||
M: illusion (>>value) ( value object -- ) swap throw [ call-next-method ] 2keep
|
|
||||||
dup [ quot>> ] [ model>> ] bi and
|
|
||||||
[ backtalk ]
|
|
||||||
[ 2drop ] if ;
|
|
Loading…
Reference in New Issue