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

[REBOL] Re: Newbie VID question ctd.

From: greggirwin::mindspring::com at: 4-Oct-2003 17:27

Hi Kai, KP> Why does the face/color not get set to what I would expect, but black instead? Because you're returning a word! from the block [yellow red], not a tuple! value. Just add a REDUCE and you're all set. view layout [ toggle-start: toggle 60 "Start" mint [ face/color: pick reduce [yellow red] face/data face/texts/1: pick ["Stop" "Start"] face/data show face ] ] It takes some getting used to when REBOL does, or doesn't, evaluate things, but if you get black where you expect a color you've used word for, that's almost always the cause. You can also just specify the colors directly, though it doesn't give you the "untouched" color (mint) as you have above: view layout [ toggle-start: toggle 60 "Start" "Stop" yellow red ] -- Gregg