]> gitweb.factorcode.org Git - factor.git/commitdiff
all signals update on activation
authorSam Anklesaria <sam@Tintin.local>
Wed, 27 May 2009 21:49:40 +0000 (16:49 -0500)
committerSam Anklesaria <sam@Tintin.local>
Wed, 27 May 2009 21:49:40 +0000 (16:49 -0500)
extra/ui/frp/signals/signals.factor

index 3c6c4103bc4f452a09372b2695388d0200e67739..a08a49e32915d9131da4b66a0a148d52ef731652 100644 (file)
@@ -5,8 +5,8 @@ TUPLE: multi-model < model ;
 GENERIC: (model-changed) ( model observer -- )
 : <multi-model> ( models kind -- model ) f swap new-model [ [ add-dependency ] curry each ] keep ;
 M: multi-model model-changed over value>> [ (model-changed) ] [ 2drop ] if ;
-M: multi-model model-activated dup dependencies>> dup length 1 =
-   [ first swap model-changed ] [ 2drop ] if ;
+M: multi-model model-activated dup dependencies>> [ value>> ] find nip
+   [ swap model-changed ] [ drop ] if* ;
 
 TUPLE: basic-model < multi-model ;
 M: basic-model (model-changed) [ value>> ] dip set-model ;