I am back to playing with my button dis-/enabling function.

Taking Gabriele's last post on the topic into (my limited) consideration, I=
 have
it partially working.

Disabling works, but enabling fails. 

As far as I understand, the problem may be that Rebol stores butt/colors/1=
 in 
user-data as a word..?

If so, how would  I cast that to a tuple? 

Or am I totally off?

Thanks,
Kai


rebol[]

disable: func[ butt [object!] flag [logic!]] [
  either flag 
    [ butt/user-data: butt/colors/1   butt/colors: [ gray ]  butt/color:=
 gray ]
    [ butt/color:     butt/user-data  butt/colors: [ butt/user-data ]]
  show butt
]
scr:  center-face layout [
   goldie:    btn 150 gold    "Enable lemon" [ disable lemon false ]
   lemon:     btn 150 yellow  "Click me" 150 [ disable lemon true  ] colors=
 [ yellow ]
]
unview/all
view scr
;halt

-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to