[REBOL] Re: Programatically creating layouts
From: andy::flyingcat::com at: 9-Sep-2002 23:39
> On Behalf Of Gabriele Santilli
>> AF> My question today is one relating to variable scoping, basically.
> Then you'll be a bit surprised, when you'll discover that the
> concepts of "variable" and "scoping" don't make much sense with
> REBOL. :-) However, your problem can be solved without having to
> discuss variable scoping at all.
I knew that, actually :-) I couldn't think of a better way to describe
> ; channel was missing in your example, i think. I just added
> ; a dummy item...
> test_list: [channel "name of title" 00:30 ]
Yes, it was; I was cutting down a larger program into a small example.
> mygrid: [style btn button with [grid-offset: none grid_time: none] ]
> grid_count: 0
> foreach [channel title time ] test_list [
> ;append mygrid "bn-01" ??
> append mygrid 'btn
> append mygrid title
> append mygrid 'with
> append/only mygrid compose [grid-time: (time)]
> grid-f: layout mygrid
> Here I get:
The append/only is a useful trick. I had tried to get the same effect
with append to-block. The fact that parens are evaluated within
compose blocks was the piece I was missing.