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 base
and 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?
break
breaks the outer loop, that's it.
any
, some
and 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 break
returned false.
layout [tb: box wrap 10x1000 ". . . . . . . . ."]
size-text tb
== 6x171
== 51x15
if
keyword, for example. I got examples for that today here at gitter, btw.