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

[REBOL] Re: check box setting

From: carl:cybercraft at: 29-Jun-2001 18:06

On 29-Jun-01, [philb--upnaway--com] wrote:
> Hi Francios, > You will need to assign your check (box) a variable name .. for > example > view layout [cb: check yes button "State?" [print cb/data] ] > If you dont want it enabled then you could use a different type of > field an LED perhaps? > Cheers Phil
The above works, but is it just me who finds the use of 'data instead of 'state odd for a check box? The default values are none for 'data yet false for 'state, which suggests it's meant to be 'state but View's altering 'data instead. This show's what I mean... view layout [ text "Click on the check box and watch the output." x: check [print reform ["x/data:" x/data "x/state:" x/state]] do [print reform [ "Default Values: x/data:" x/data "x/state:" x/state ]] ] Which gives me this output... Default Values: x/data: none x/state: false x/data: true x/state: false x/data: false x/state: false x/data: true x/state: false x/data: false x/state: false etc... So, is it a bug, or am I missing something and a check box with a none as its default makes sense?
> -- Original Message -- > Guys, how do I set the value of a check box? Is there a doc that > covers this issue..? I have an example below I would like to > use....if function/text isn't equal to "HR" then then an alert will > be generated and the checkbox returned to an unchecked status. > Ideally I would like the checkbox to not even be "selectable" or > even visable unless function/text = "HR" however, I have not been > able to work out how to do this either :) > udc: label right 95x24 "UDC" check > [if function/text <> "HR" > [alert "Not valid for this device" > set udc/????? ????] > return ] > Any help appreciated > Francois
-- Carl Read [carl--cybercraft--co--nz]