[REBOL] Re: draw has no access to the current face
From: rotenca:telvia:it at: 29-Sep-2002 22:32
> The idea is to replace x-color with the desired color at runtime. Finally
> the desired color is stored in the face/user-data .
> draw-layout: [
> h2 "Draw buttons"
> style draw-button box 24x24 effect [
> draw [pen black fill-pen x-color circle 12x12 10]]
> Unfortunately face/user-data is unknown in this block.
> Is there a way to access the face object here? That is my question !
view layout [
style draw-button box 24x24 with [
effect: [draw [pen black fill-pen user-data circle 12x12 10]]
draw-button user-data red
draw-button user-data green
So you magically bind the effect block words to the face object words.