block?tip! I didn't even think of putting
canvas/draw: canvas/drawin the
on-createdblock. That it works just confuses me more tbh. I had assumed that for some reason View just hadn't detected the change to the draw block so it didn't update, and
canvas/draw: canvas/drawtricked it into re-checking it. But if it works to just do it once before even trying to add a circle, then I'm even more clueless than I thought. ;) I'm sure someone will come along who can break it down, the Red community doesn't seem to have any shortage of wizards.
@temperfugit I think I got it: whenever you add a second-order series to draw, you have to "touch" it with
draw: drawkind of thing. Here is your modified code where you don't have to do it - because everything is defined at once and no second order series is added:
tempCircle: func [event] [ canvas/draw/7/4/4: event/offset - 10 if canvas/draw/7/4/5 = 0x0 [ canvas/draw/7/4/5: 20x20 ] ] view [ on-down [tempCircle event] on-mid-down [probe canvas/draw] canvas: base 600x600 white all-over draw [ transform 300x300 0 1 1 0x0 [ shape [move 250x400 curve 250x400 200x350 200x250 200x150 250x100 300x100 350x100 400x150 400x250 400x350 350x400 350x400] ; temp: [fill-pen blue ellipse 0x0 0x0] fill-pen off pen silver circle 250x400 5 circle 200x350 5 circle 200x250 5 circle 200x150 5 circle 250x100 5 circle 300x100 5 circle 350x100 5 circle 400x150 5 circle 400x250 5 circle 400x350 5 circle 350x400 5 circle 350x400 7 ] ] ]
I guess it is the same reason @9214 just posted.
holdingword is global, despite being enclosed in
Is I have a list like:
button-list: [field1 "aaa" field2 "bbb" field3 "ccc" ]
How could I dynamically create a GUI with those 3 fields ?
Red  view/no-wait [ field1: field 70 hint "aaa" [probe face/text]] field2: field 70 hint "bbb" [probe face/text]] field2: field 70 hint "ccc" [probe face/text]] ]
if. You can see that
. An expression inside
()is evaluated (e.g.
a: ( 1 + 2) a; 3) and an expression inside
is not evaluated (not sure if this is proper term). So you should use
()for grouping code to run it immediately. You should use
to pass some code/data.
true. It should be "true-thy value" or something like this.
view [ b: button extra 'a [probe get in get face/extra 'text] a: area "this is an area text" ]