Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: stylize / feel question

From: brett:codeconscious at: 28-Mar-2002 19:23

Hi Ashley, 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 face/print-field . I've changed your example to show these things. stylize/master [ box2: box with [ field1: "A" 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" ] ] Regards, Brett