getting error with banner menus in Schematic window

Discussion in 'Cadence' started by Pratheesh.s, Oct 16, 2008.

  1. Pratheesh.s

    Pratheesh.s Guest

    procedure(addbanner(args)



    Hi,

    I am trying to insert one banner menu and I have used the below code.
    It is working fine but instead of displaying "Open"( It is the menu
    item name) alone it shows "Open period" I dont know why it happens.
    Can any body please give a reply ASAP


    procedure(addbanner(args)



    hiInsertBannerMenu(
    args->window
    hiCreatePulldownMenu(
    'ciwCustomMenu
    "Alchemist"
    list(hiCreateMenuItem(
    ?name 'Open
    ?itemText "Open"
    ?callback "generatefn()"
    )
    )
    length( hiGetBannerMenus( args->window ))
    )

    )

    deRegUserTriggers("schematic" nil nil 'addbanner )
    If I ru the same code for CIW window it works fine.................Why
    this "period" thing coming??

    i have used post trigger method instead of menu trigger( Because It is
    not workng proprly if I give in this way deRegUserTriggers("schematic"
    nil 'addbanner nil )
     
    Pratheesh.s, Oct 16, 2008
    #1
  2. Pratheesh.s wrote, on 10/16/08 06:27:
    If you're adding banner menus, you should NOT do this via a post-install
    trigger. If you do that, you can find that various other things which are adding
    menus can interfere with the code.

    So, use a menu trigger instead. With a menu trigger, you'd do:
    procedure(MYaddbanner(args)

    list(
    hiCreatePulldownMenu(
    'ciwCustomMenu
    "Alchemist"
    list(
    hiCreateMenuItem(
    ?name 'Open
    ?itemText "Open"
    ?callback "generatefn()"
    )
    ) ; hiCreatePulldownMenu
    ) ; list

    )

    deRegUserTriggers("schematic" nil 'MYaddbanner )

    Essentially the menu trigger must return a list of pulldown menus to add - and
    the Design Editor interface will take care of adding them for you. Note that you
    should really write your code to have sensible prefixes in the function and
    global variable names to avoid clashing with anyone elses functions.

    Regards,

    Andrew.
     
    Andrew Beckett, Oct 16, 2008
    #2
  3. Pratheesh.s wrote, on 10/16/08 06:27:
    If you're adding banner menus, you should NOT do this via a post-install
    trigger. If you do that, you can find that various other things which are adding
    menus can interfere with the code.

    So, use a menu trigger instead. With a menu trigger, you'd do:
    procedure(MYaddbanner(args)

    list(
    hiCreatePulldownMenu(
    'ciwCustomMenu
    "Alchemist"
    list(
    hiCreateMenuItem(
    ?name 'Open
    ?itemText "Open"
    ?callback "generatefn()"
    )
    ) ; hiCreatePulldownMenu
    ) ; list

    )

    deRegUserTriggers("schematic" nil 'MYaddbanner )

    Essentially the menu trigger must return a list of pulldown menus to add - and
    the Design Editor interface will take care of adding them for you. Note that you
    should really write your code to have sensible prefixes in the function and
    global variable names to avoid clashing with anyone elses functions.

    Regards,

    Andrew.
     
    Andrew Beckett, Oct 16, 2008
    #3
  4. Pratheesh.s

    Pratheesh.s Guest

    Thank you Andrew :)
     
    Pratheesh.s, Oct 21, 2008
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.