diff --git a/basis/models/illusion/illusion.factor b/basis/models/illusion/illusion.factor index 6cab6e6371..f41a4a2444 100644 --- a/basis/models/illusion/illusion.factor +++ b/basis/models/illusion/illusion.factor @@ -5,7 +5,7 @@ TUPLE: illusion < arrow ; : ( model quot -- illusion ) illusion new V{ } clone >>connections V{ } clone >>dependencies 0 >>ref - swap >>quot over >>model [ add-dependency ] keep ; + swap >>quot over >>model [ add-dependency ] keep dup activate-model ; : backtalk ( value object -- ) [ quot>> [undo] call( a -- b ) ] [ model>> ] bi set-model ; diff --git a/extra/ui/frp/gadgets/gadgets.factor b/extra/ui/frp/gadgets/gadgets.factor index 02bc8f45cb..08c7b44002 100644 --- a/extra/ui/frp/gadgets/gadgets.factor +++ b/extra/ui/frp/gadgets/gadgets.factor @@ -4,10 +4,12 @@ ui.gadgets.editors ui.gadgets.tables ; IN: ui.frp.gadgets TUPLE: frp-button < button hook ; -: ( text -- button ) [ +: ( gadget -- button ) [ [ dup hook>> [ call( button -- ) ] [ drop ] if* ] keep t swap set-control-value - ] frp-button new-button border-button-theme f >>model ; + ] frp-button new-button f >>model ; + +: ( text -- button ) border-button-theme ; TUPLE: frp-table < table { quot initial: [ ] } { val-quot initial: [ ] } color-quot column-titles column-alignment ; M: frp-table column-titles column-titles>> ; diff --git a/extra/ui/frp/signals/signals.factor b/extra/ui/frp/signals/signals.factor index 184dd05365..c7c9736111 100644 --- a/extra/ui/frp/signals/signals.factor +++ b/extra/ui/frp/signals/signals.factor @@ -38,6 +38,7 @@ M: switch-model (model-changed) 2dup switcher>> = : ( signal1 signal2 -- signal' ) [ 2array switch-model ] 2keep [ >>original ] [ >>switcher ] bi* ; M: switch-model model-activated [ original>> ] keep model-changed ; +: >behavior ( event -- behavior ) t swap ; TUPLE: mapped-model < multi-model model quot ; : new-mapped-model ( model quot class -- const-model ) [ over 1array ] dip diff --git a/extra/ui/gadgets/alerts/alerts.factor b/extra/ui/gadgets/alerts/alerts.factor index 265c0fdc74..e948c92d43 100644 --- a/extra/ui/gadgets/alerts/alerts.factor +++ b/extra/ui/gadgets/alerts/alerts.factor @@ -10,7 +10,7 @@ IN: ui.gadgets.alerts :: ask-user* ( model string -- model' ) [ [let | lbl [ string