getting error with banner menus in Schematic window

P

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 wrote, on 10/16/08 06:27:
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 )
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.
 
Pratheesh.s wrote, on 10/16/08 06:27:
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 )
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
Senior Solution Architect - Cadence Design Systems Ltd (UK)
 

Welcome to EDABoard.com

Sponsor

Back
Top