[REBOL] Re: VID begniner
From: gscottjones:mchsi at: 14-Sep-2002 18:02
From: "Brahim"
> I m a beginning rebol developpement.
> using "repeat i 10" inside "view layout" block leds to this error :
> Unknown word or style: repeat
> Unknown word or style: i
>
> can someone help me please.
> thanks,
Hi, Brahim,
Welcome to VID ("Video Interface Dialect"). Probably the single most
helpful thing that I can do is stress that VID is a dialect that controls
the view graphics. While dialects may share words in common with REBOL,
these words are independently defined for the sole purpose of the dialect,
and may not reflect the same usage as REBOL. And by extension of this
concept, words used in REBOL may not be defined at all in a dialect. You
can think of a dialect as a separate mini-language that typically has a very
special purpose. You have discovered that the word repeat and the variable
index i are not defined in VID.
I do not know what end goal you were seeking in the use of the repeat
statement. If you were trying to repeat a structure in a layout, you can
set up a block as follows:
blk: copy []
repeat i 10 [append append blk 'button to-string i ]
view layout blk
In this case the repeat word is not in the block to be parsed by the dialect
rules.
You may use virtually any REBOL word in the action blocks. For example:
view layout [button "Print 10" [repeat i 10 [print i]]]
You may wish to check out the rebol.com documentation pages for further
information on words that make up the VID dialect. Of course, you are
welcome to ask further questions on the list.
Hope this helps.
--Scott Jones