From 40fc26556d7f96344ad1091f8071c7c5401d5277 Mon Sep 17 00:00:00 2001 From: Sam Anklesaria Date: Tue, 19 May 2009 16:40:39 -0500 Subject: [PATCH] manual models for alert buttons --- extra/ui/frp/frp.factor | 7 ++++--- extra/ui/gadgets/alerts/alerts.factor | 15 +++++++++------ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/extra/ui/frp/frp.factor b/extra/ui/frp/frp.factor index f59361a0ec..459d52983f 100644 --- a/extra/ui/frp/frp.factor +++ b/extra/ui/frp/frp.factor @@ -77,9 +77,10 @@ M: frp-product model-activated dup model-changed ; ! Gadgets TUPLE: frp-button < button hook ; -: ( text -- button ) [ [ t swap set-control-value ] keep - dup hook>> [ call( button -- ) ] [ drop ] if* ] - frp-button new-button border-button-theme f >>model ; +: ( text -- button ) [ + [ t swap set-control-value ] keep + dup hook>> [ call( button -- ) ] [ drop ] if* + ] frp-button new-button border-button-theme f >>model ; 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/gadgets/alerts/alerts.factor b/extra/ui/gadgets/alerts/alerts.factor index 0c4a4fbd67..8cb6a3fd08 100644 --- a/extra/ui/gadgets/alerts/alerts.factor +++ b/extra/ui/gadgets/alerts/alerts.factor @@ -1,15 +1,18 @@ -USING: accessors kernel ui ui.frp ui.gadgets ui.gadgets.labels -ui.gadgets.buttons ui.gadgets.packs locals sequences fonts io.styles ; +USING: accessors models kernel ui ui.frp ui.gadgets ui.gadgets.labels +ui.gadgets.editors ui.gadgets.buttons ui.gadgets.packs +locals sequences fonts io.styles ; IN: ui.gadgets.alerts :: alert ( quot string -- ) { 10 10 } >>gap 1 >>align string