[REBOL] Button en-/disabling revisited
From: kpeters:otaksoft at: 26-Aug-2007 17:59
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?
disable: func[ butt [object!] flag [logic!]] [
[ butt/user-data: butt/colors/1 butt/colors: [ gray ] butt/color: gray ]
[ butt/color: butt/user-data butt/colors: [ butt/user-data ]]
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 ]