• 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. Issue while I use hiCreateMenuItem Callback

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 142
  • Views 13228
  • 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

Issue while I use hiCreateMenuItem Callback

CalenZoo
CalenZoo over 9 years ago

Hi all,

I actually have a problem when I want to put an argument in a defun function. I do not see where I am wrong...

I use the following code :

Menu_Title_Gen =
 hiCreateMenuItem(
  ?name  'Menu_Title_Gen
  ?itemText "Generateur de Titre"
  ?callback "(Generateur_de_titres_Interface ( \"YES\" ))"
 )

defun( Generateur_de_titres_Interface (IHM_Menu) 
 let(()
 Generateur_de_titres_FormatMenu (IHM_Menu)
 if(IHM_Menu == "YES" then  
  hiDisplayForm(Generateur_de_titres_Menu)
 )
 ) 
);enddefun

I've got the following message error :

Message: *Error* eval: not a function - "YES"

Does someone could help me on that point ?

Than you in advanced,

regards,

Patrick

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    Hi Patrick,

    Your callback is incorrectly specified. It either needs to be:

    ?callback "(Generateur_de_titres_Interface  \"YES\" )"

    or

    ?callback "Generateur_de_titres_Interface( \"YES\" )"

    You've surrounded the argument by a set of parentheses - and that's being interpreted as a function call. Essentially you need either a LISP-style call "(functionName arg1 arg2 arg3...)" or C-style call "functionName(arg1 arg2 arg3...)" (note that in the C-style you must not have a space between the function name and the open parenthesis).

    Regards,

    Andrew

    • 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