• 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. callback when form in unmapped

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 14130
  • 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

callback when form in unmapped

drdanmc
drdanmc over 6 years ago

I wanted to have a form that changes depending on what is selected like the leHiEditProp() form.  To get there

I created a modless form with with hiCreateAppForm().  When the code is run that calls hiDisplayForm() I do two things:

hiSetBindKey("Layout" "None<Btn1Down>" "mouseSingleSelectPt() myCallback(?new_selection t)")

leRegUserObjectSelectionFilter("myFilterFunction")

The filter function only allows selection of the type of object I want to be able to select and the bind key intercepts the left click that would select something and updates stuff on my form accordingly.  This part seems to work.  What I haven't quite sorted out is how to make sure that when the form is closed (via OK, via Cancel, via the window manager, or via SKILL) that I always call

leUnregUserObjectSelectionFilter()

hiSetBindKey("Layout" "None<Btn1Down>" "mouseSingleSelectPt()")

to put things back to normal.

I've tried changing the ?callback argument from "myCallback()" to list("myCallback()" "myCallback(?cleanup t)") which lets me handle the "cancel" case but I'm missing the "OK" case.

Am I even on the right track or is there a cleaner way?   I want to avoid leaving my virtuoso session (or worse, someone else's session) in a weird state.

Thanks

-Dan

  • Cancel
  • mbracht
    mbracht over 6 years ago

    Hi,

    Can you try

        ?callback    '("myCallback(?cleanup t)"    "myCallback(?cleanup t)")

    regards

    Max

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • drdanmc
    drdanmc over 6 years ago in reply to mbracht

    the problem is if someone clicks "apply" I don't want to run the cleanup part.  Rather I'd like to be able to select something else in the layout and have my form update appropriately.  I only want to run cleanup if the window is closed.  

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mbracht
    mbracht over 6 years ago in reply to drdanmc

    there is s way to define separate callbacks for Ok, Apply and Cancel in terms of the ?buttonLayout argument to hiCreateAppForm:

    ?buttonLayout    list( 'Empty
                           list('OK     "myOkCallback(hiGetCurrentForm())")
                           list('Cancel "myCancelCallback(hiGetCurrentForm())")
                           list('Apply  "myApplyCallback(hiGetCurrentForm())")

    that way your may easily do the cleanup  for Ok and Cancel only

    • 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