From 4d2d9f86b49594d789ce7d20877fada9365a356e Mon Sep 17 00:00:00 2001 From: Sam Anklesaria Date: Wed, 17 Jun 2009 18:05:54 -0500 Subject: [PATCH] ui.frp.layout checks namespace only to 1 level --- extra/ui/frp/layout/layout.factor | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/extra/ui/frp/layout/layout.factor b/extra/ui/frp/layout/layout.factor index af7432ae43..038b739e52 100644 --- a/extra/ui/frp/layout/layout.factor +++ b/extra/ui/frp/layout/layout.factor @@ -1,21 +1,22 @@ -USING: accessors arrays fry kernel lexer make math.parser models +USING: accessors assocs arrays fry kernel lexer make math.parser models models.product namespaces parser sequences ui.frp.gadgets ui.gadgets ui.gadgets.books ui.gadgets.tracks vectors words combinators ui.frp.signals ; QUALIFIED: make IN: ui.frp.layout -PREDICATE: true < word t = ; SYMBOL: inserting TUPLE: layout gadget size ; C: layout TUPLE: placeholder < gadget ; ERROR: no-models-in-books models ; DEFER: insert-item -HOOK: , inserting ( uiitem -- ) -M: f , make:, ; -M: placeholder , [ inserting get insert-item ] keep relayout ; -M: true , dup placeholder? [ inserting set ] [ "No location to add UI item" throw ] if ; +: , ( uiitem -- ) inserting namespace at { + { f [ make:, ] } + { t [ dup placeholder? [ inserting set ] [ "No location to add UI item" throw ] if ] } + [ placeholder? [ [ inserting get insert-item ] keep relayout ] [ drop ] if ] +} case ; + SYNTAX: UI[ parse-quotation '[ [ t inserting _ with-variable ] ] over push-all ; SYNTAX: ,% scan string>number [ , ] curry over push-all ;