Arbortext Command Language > Hooks > menuloadbeforehook
  
menuloadbeforehook
menuloadbeforehook
Function prototype:
hook(window, cmd)
Synopsis
Use with:
add_hook(hookname, func[, prepend])
remove_hook(hookname, func)
where hookname is menuloadbeforehook.
This hook is called before a new set of menus is loaded into the menu bar by a menu_load command or when a new document is loaded.
* 
This contrasts with the menuloadhook function which is called after the menu bar has been loaded.
The hook function can be used to substitute a different set of menus by issuing a recursive menu_load command and returning -1 to signal that the hook function handled the menu load.
Arguments
window is the window identifier of the window containing the menu bar.
cmd is the full menu_load command string that will be executed. The hook can modify this command (or replace it) and execute it with the execute function. It should return -1 in this case.