• 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. triggering the done procedure for enterPoints()

Stats

  • Locked Locked
  • Replies 10
  • Subscribers 143
  • Views 17229
  • 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

triggering the done procedure for enterPoints()

jaleco
jaleco over 11 years ago
I am using an enterPoints function that does not seem to recognize use of the Enter key, or a double click (typical done trigger for enterPath) as triggers for its done procedure.  How does one trigger the done procedure for enterPoints?  The esc key is recognized as a cancel function.  The form contains a cancel button, but no done button.
  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 11 years ago

    Well, first thing to check is that the bindkeys for Enter and double click left mouse are set, but assuming they are, I suspect it's probably because you're not using a ?doneProc with enterPoints and have "Repeat Commands" set in the Options->Editor form.

    If Repeat Commands is enabled, then the enterPoints() function does not return after you've hit the return key or double-clicked - instead, it goes back to the "first" prompt again and asks again. Since the expected use model with an enterFunction is to use the ?doneProc callback to do the action, this makes sense - as it allows you to repeatedly do the same thing over and over again.

    You can observe this by doing:

    procedure(MyDoneProc(win ok points)  printf("FINISHED: %L %L\n" ok points))
    enterPoints(?prompts '("first" "next") ?doneProc "MyDoneProc")

    You should see the "FINISHED" message when you hit return or double click. Is that happening? Also, the prompt will go back to "first" rather than "next". Then also try turning off Repeat Commands and see what happens.

    Kind Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • FormerMember
    FormerMember over 7 years ago in reply to Andrew Beckett

    Hello Andrew,

    I'm getting a loop of events as you mentioned. It will ask for points and run the MyDoneProc and then it will go back to the enterPoints function on loop.

    You also mentioned this:

    Andrew Beckett said:
    Then also try turning off Repeat Commands and see what happens.

    I don't really know how to do it. But the script I'm writing should be for usable by different numbers of user which I'm guessing might or might not have the "Repeat Commands" turned off.

    If I pre-established the number of points with the ?wantPoints enterPoints procedure will terminate and my script will continue.

    Do you know what I'm doing wrong or a solution to this problem?

    Best Regards,

    Ines Martins

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 7 years ago in reply to FormerMember

    Hi Ines,

    You could use envGetVal("layout" "modalCommands") to get the current value of the "repeat commands" setting, and then envSetVal("layout" "modalCommands" 'boolean nil) to turn it off. Potentially you could restore the value afterwards...

    Note that same setting exists for schematic too too (i.e. envGetVal("schematic" "modalCommands") ).

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 7 years ago in reply to FormerMember

    Hi Ines,

    You could use envGetVal("layout" "modalCommands") to get the current value of the "repeat commands" setting, and then envSetVal("layout" "modalCommands" 'boolean nil) to turn it off. Potentially you could restore the value afterwards...

    Note that same setting exists for schematic too too (i.e. envGetVal("schematic" "modalCommands") ).

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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