[REBOL] Re: stylize / feel question
From: brett:codeconscious at: 28-Mar-2002 19:23
The direct answer is that there are two "FIELD1" words being used here. One
lives in (is bound to) the context of the BOX2 style object, the other is in
the A face object.
When your feel/engage function was created the reference to FIELD1 was
within in the context of the style BOX2.
If you want the engage function to refer to the face call
I've changed your example to show these things.
box2: box with [
print-field: does [print field1]
feel: make feel [
engage: func [face action event] [
if action = 'down [print-field]
if action = 'up [face/print-field]
view layout [
text "Click on box to print field"
text "Click on button to print same field"
a: box2 red
button "Print" [a/print-field]
do [a/field1: "B"]
button "Change style" [
set in get-style 'box2 'field1 "C"