• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Updating a form in Skill

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 15071
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Updating a form in Skill

mschw
mschw over 7 years ago

Hello,

i have a question on how forms are updated in Skill when properties of elements in the form are changed in the background.

Within the following small example a form with a button gets insatiated.

button=
hiCreateButton(
                              ?name 'button
                              ?callback "printf(\"Button pushed\")"
                              ?buttonText "Push"
);hiCreateButton


form=
hiCreateAppForm(
                                ?name 'myform
                                ?fields list(button)
                                 ?formTitle "Simple Form"
);hiCreateAppForm

hiDisplayForm(form)

If i enter the code line form->button->enabled=!form->button->enabled several times in the CIW, the button gets enabled/disabled. If I enter the code line button->enabled=!button->enabled nothing happens at all, although the property changes. Is there a way to update the form, if the enable property will be changed using the second way?

Many thanks.

Best regards,

Matthias

  • Cancel
Parents
  • mschw
    mschw over 7 years ago

    OK, i figured this out myself: the Button can be enabled using hiSetFieldEnabled(button t).

    However, it would be interesting to know what the difference between hiSetFieldEnabled(button t) and button->enabled=t  is.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • mschw
    mschw over 7 years ago

    OK, i figured this out myself: the Button can be enabled using hiSetFieldEnabled(button t).

    However, it would be interesting to know what the difference between hiSetFieldEnabled(button t) and button->enabled=t  is.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • skillUser
    skillUser over 7 years ago in reply to mschw

    Hi Matthias,

    Essentially the API access hiSetFieldEnabled(button t) is about the same as accessing the button structure and changing the enabled attribute, but I think that your question is more about the name scoping and access.  For example the button variable can (and should be) local to your procedure that builds the form fields and the form, but the form variable itself has to be global - you can refer to it locally as form and this is fine but outside of the scope (let or prog for example) you can refer to it as myform.  So at a global scope you can do myform->button->enabled = !myform->button->enabled to toggle the enabled state, or you could use hiSetFieldEnabled(myform->button t) to set it to be enabled.  If you didn't even use a let() or prog() statement I still would not try to refer to the 'button' variable directly, only through the 'hierarchy' of the form structure; then we are referring to the button that is placed/instantiated on the form.

    Hopefully this helps explain things a little?

    Best regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mschw
    mschw over 7 years ago in reply to skillUser

    Hi Lawrence,

    thanks for your detailed explanation, it is very useful for me.

    Best regards,

    Matthias

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information