]> gitweb.factorcode.org Git - factor.git/commitdiff
models.illusion allows multiple refs for original
authorSam Anklesaria <sam@Tintin.local>
Sat, 16 May 2009 00:31:43 +0000 (19:31 -0500)
committerSam Anklesaria <sam@Tintin.local>
Sat, 16 May 2009 00:31:43 +0000 (19:31 -0500)
basis/models/illusion/illusion.factor

index dde514a3d094f55174e0bfd8897b2db67ebf8d2d..78998e9ab09ec51dfef5c9a79dba82474f5718fb 100644 (file)
@@ -7,10 +7,6 @@ TUPLE: illusion < arrow ;
     illusion new V{ } clone >>connections V{ } clone >>dependencies 0 >>ref
     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 (>>value) ( value object -- ) swap throw [ call-next-method ] 2keep
-   dup [ quot>> ] [ model>> ] bi and
-   [ backtalk ]
-   [ 2drop ] if ;
\ No newline at end of file
+M: illusion update-model ( model -- ) [ [ value>> ] keep backtalk ] with-locked-model ;
\ No newline at end of file