@Ungaretti If you haven't used this feature you may forget about it. The Red has many types for key-value things
map! for associative arrays, and
object! for immutable (keys) container. Not everyone used Lua to know that feature.
@toomasv It is easy but I have to use it many times. I have many 1 more tab and there might be more elements in each tab. It is not a problem but I am just looking for conveniences as
vid taught me.
view/no-wait [ p: tab-panel [ "size" [ x: field "200" y: field "200" button "set size" [ b/size/x: x/data b/size/y: y/data ] ] "image" [ b: base 50x50 t: text "some text" ] ] ] react [t/offset/x: b/offset/x + b/size/x + 10] do-events
@nedzadarek I'm curious if this might do the automatization?
view [ p: tab-panel [ "size" [ x: field "200" y: field "200" button "set size" [ b/size/x: x/data b/size/y: y/data ] ] "image" [ b: base 50x50 t: text "some text" ] ] do [ foreach pan pane/1/pane [ foreach [bas txt] pan/pane [ if all [bas/type = 'base txt/type = 'text] [ react [txt/offset/x: bas/offset/x + bas/size/x + 10] ] ] ] ] ]
Of course, this is only for consecutive
text faces. But still?
I'm resuming my documentation of Red at helpin.red , and working on the parse chapters. There is a lot to be done there.
Since I can't find information about many keywords, I'm learning by trial-and-error, but I stumble on some inexplicable behaviours, for example: Red blog says that
break should "break out of a matching loop, returning success". I try it but it returns false (failure?):
block: [1 2 3 4] print parse block [ integer! (print 1) integer! (print 2) break integer! (print 3) integer! (print 4) ]
1 2 false
It seems to me as the same as ´fail´ or ´reject´. How come?
I think I have checked all the available online documentation. Is there any hidden or unknown document that explain parse's keywords?
breakbreaks the outer loop, that's it.
while. That is the information I was missing. I thought of a "matching loop" as the parsing itself. It is a matching loop after all. Hence my surprise when a parse with
layout [tb: box wrap 10x1000 ". . . . . . . . ."]