I want to add GUI items from a series. I am trying following code but it does not work:
mylist: ["first" "second" "third" "fourth" ]
view[
foreach i mylist [
text i ]]
The error is:
*** Script Error: VID - invalid syntax at: [foreach ll mylist]
*** Where: do
*** Stack: view layout cause-error
Where is the problem and how can it be solved? Thanks for your answers.
Remember that...
...is a dialect, it is not regular code. It's a special dialect that has some evaluative qualities, but the normal rules don't always apply.
Don't forget that a dialect is just a block of values like anything else in Red. You can pre-build it as such:
You can stick a
PROBE
betweenVIEW
andCOLLECT
there to see what you're generating andCOLLECT/KEEP
gives you a lot of scope for tuning the values that end up in your view spec.