problem with hiCreateToggleField

Discussion in 'Cadence' started by bedoune, Jun 19, 2008.

  1. bedoune

    bedoune Guest

    Hello All,

    I have a problem with hiCreateToggleField.

    In my form, i have only one toggle button. if button == t, i would
    like to do something, else ...

    but i don't know why, when i extract the value of my togglebutton, i
    always have the same result: value = t whatever i press or not.

    Here the definition of my button

    RO = hiCreateToggleField(
    ?name 'RO
    ?prompt ""
    ?choices '((Read "Read Only?"))
    ?value list(t)
    ?defValue list(t)
    );; end Toggle

    and i extract my value like this:

    ROVar = car(MainForm~>RO~>value)

    Clicking OK on my MainForm close the form and run the program. But the
    value of my toggle button is always same. I don't understand why ?.
    I tried to remove ?defValue list(t), but no changes...

    May someone have an idea please?


    Thanks for your help.

    Regards,

    b.
     
    bedoune, Jun 19, 2008
    #1
  2. bedoune

    Guest Guest

    I don't see this in my testing.

    What is the value of:

    MainForm->RO->Read->value

    ?

    Also, if you only need a single toggle, why not use a Boolean Button Field?

    In any case, what you are doing should work, but if accessing the value
    through the individual toggle's value works, that's your workaround.

    -Pete Zakel
    ()

    "You can't judge a book by the way it wears its hair."
     
    Guest, Jun 21, 2008
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.