Using REBOL / View 2.7.8 Core, I would like to prepare a presentation layout in advance, automatically assigning words to various layout elements, as in the following example. Instead
prepared-view: [across cb1: check label "Checkbox 1" cb2: check label "Checkbox 2" cb3: check label "Checkbox 3" cb4: check label "Checkbox 4" ] view layout prepared-view
I would like the words cb1 thru cb5 created automatically, for example:
prepared-view2: [ across ] for i 1 4 1 [ cbi: join "cb" i cbi: join cbi ":" cbi: join cbi " check" append prepared-view2 to-block cbi append prepared-view2 [ label ] append prepared-view2 to-string join "Checkbox " i ] view layout prepared-view2
However, while the difference prepared-view prepared-view2 shows the difference is not in the analyzed block ( == [] ), the second script leads to an error:
** Script Error: cb1 word has no context ** Where: forever ** Near: new/var: bind to-word :var :var
I spent hours trying to understand why, and I think that somehow new words should be tied to a specific context, but I have not yet found a solution to the problem.
What do I need to do?
rebol rebol3 rebol2
jjr_
source share