[REBOL] Re: Programatically creating layouts
From: andy:flyingcat at: 9-Sep-2002 15:49
Thanks; the nesting of the reduces combined with the to set-word wasn't
quite obvious to me :-)
Andy
---
test_list: ["04" "name of title" 00:30 ]
mygrid: [style btn button with [grid-offset: none grid_time: none]]
grid_count: 0
foreach [channel title time ] test_list [
append mygrid reduce [
to set-word! 'bn-01 'btn title 'with reduce [to set-word!
'grid_time
time]
]
]
grid-f: layout load mygrid
print mold mygrid
REBOL gives you lots of flexibility to do things the way that seems best
in
different contexts (pun intended). Sometimes one syntax or another will
help
to make it clear which parts of a block are static and which are
dynamic; to
make things as uncluttered as possible; or that give the best
representation
of what the output should look like.
HTH!
--Gregg