]> gitweb.factorcode.org Git - factor.git/commitdiff
frp-action-fields
authorSam Anklesaria <sam@Tintin.local>
Thu, 18 Jun 2009 20:54:24 +0000 (15:54 -0500)
committerSam Anklesaria <sam@Tintin.local>
Thu, 18 Jun 2009 20:54:24 +0000 (15:54 -0500)
extra/ui/frp/gadgets/gadgets.factor

index ddcde69eafceebdd9afd09875fa14d14055237ba..15b1aa4c30917c7979ddf9ce62c3333e6d3c8cff 100644 (file)
@@ -51,6 +51,9 @@ M: frp-field model-changed 2dup frp-model>> =
 : <empty-editor*> ( -- field ) "" <model> <frp-editor> ;
 : <empty-editor> ( model -- field ) "" <model> <switch> <frp-editor> ;
 
+: <frp-action-field> ( -- field ) f <action-field> dup [ set-control-value ] curry >>quot
+    f <model> >>model ;
+
 GENERIC: output-model ( gadget -- model )
 M: gadget output-model model>> ;
 M: table output-model dup multiple-selection?>>