Author Topic: AT&RT plugin sometimes can't create its items in MB menu  (Read 837 times)

boroda

  • Hero Member
  • *****
  • Posts: 5207
maybe not a big issue, but it's rather annoying during plugin debugging, when i frequently start MB from VS and try to use plugin's menu items too quickly. also, some plugin users have reported this issue earlier.

this "bug" appears when i access MB main menu before plugin has created its menu items. in this case, plugin will never create menu items using:

Code
MbApiInterface.MB_AddMenuItem("mnuTools/[1]" + PluginMenuGroupName, null, null);

only the MB restart helps.

this also means that plugin can't create menu items if it's manually enabled in MB prefs> plugins. i think, because i usually open MB prefs using MB menu (i.e. i use MB menu before plugin creates its menu items).

P.S. this issue doesn't concern MB context menu items created with:

Code
MbApiInterface.MB_AddMenuItem("context.Main/" + PluginMenuGroupName, null, null) ;

P.P.S. new guess: maybe "[1]" in MB_AddMenuItem("mnuTools/[1]") matters.

boroda

  • Hero Member
  • *****
  • Posts: 5207
P.P.S. new guess: maybe "[1]" in MB_AddMenuItem("mnuTools/[1]") matters.

no, the issue persists after removing "[1]".