You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't see an API for getting a command by name, but I'd like to be able to disable the exit action on menus in certain contexts. Based on a quick read through the API, it seems like if I could get a reference to the descriptor for the pre-populated exit action, I could then disable it.
The text was updated successfully, but these errors were encountered:
Unfortunately, it's not possible to add a search of a command by name, because the commands names are not unique.
In particular:
different commands can have the same name but different argument number
you can have the same command name in different menus
For user-defined commands, you get the CmdHandler when inserting it in a menu.
The problem is with the two default global commands "exit" and "help". They're "global" meaning that these commands are visible from every submenu. These are created internally by the library and their Cmdhandler is not exported.
To disable the global commands, the library should expose the CmdHandler of these commands. This feature is not so simple to implement, because the commands are added at the session level, and since we may have many sessions (e.g. a local session, multiple remote sessions, etc.) they are duplicated.
I don't see an API for getting a command by name, but I'd like to be able to disable the
exit
action on menus in certain contexts. Based on a quick read through the API, it seems like if I could get a reference to the descriptor for the pre-populatedexit
action, I could then disable it.The text was updated successfully, but these errors were encountered: