• 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. How to run code in function of OK & Cancel buttons

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 142
  • Views 1464
  • 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

How to run code in function of OK & Cancel buttons

kkdesbois
kkdesbois 8 months ago

Hello,

In my script, I open a form which creates files when OK button is clicked.

I'd like my script to go on in a direction (do things with the created files) when the OK button of the form is pressed and in another direction when the Cancel button is pressed.
I have no control on the OK/cancel button callbacks of the form.

I'm searching a way to make my script wait for an action on OK/Cancel of the form and go on according to which button has been clicked.

Note that the form opened has not a modal dialogStyle.

Laurent.

  • Cancel
  • Andrew Beckett
    Andrew Beckett 8 months ago

    Laurent,

    When creating your form (with hiCreateAppForm or hiCreateLayoutForm), you can specify the ?callback argument as a list of two callbacks - the first is for OK and the second for Cancel.

    See Cadence User Interface SKILL Reference -- hiCreateAppForm - hiCreateAppForm

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • kkdesbois
    kkdesbois 8 months ago in reply to Andrew Beckett

    Thanks Andrew,
    Unfortunately I don't own the code creating the form, I only call the function creating the form. So, I can't modifiy the callback

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett 8 months ago in reply to kkdesbois

    You can change the callback:

    hiChangeFormCallback(myForm list('CCFokCallback 'CCFcancelCallback))

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • kkdesbois
    kkdesbois 8 months ago in reply to Andrew Beckett

    thanks

    • 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