Skip to main content
Inspiring
June 25, 2009
Question

Add menu after the plug-in has started

  • June 25, 2009
  • 1 reply
  • 1101 views

Hello,

I want to added a menu under 'File' menu after the plug-in has started.

Through the shell example in SDK, i am able to add menus on plug-in startup but cant figure out how to add menus after the plug-in has started.

Is it possible to do so? If yes, then how to do it?

Thanks,

Hitesh

This topic has been closed for replies.

1 reply

A. Patterson
Inspiring
June 25, 2009

As far as I know, you can add a menu anytime though I suppose it wouldn't shock me if those calls simply didn't function after load. What exactly is the problem you're having -- that the menus don't get added, that the calls fail or that you can't figure out how to get the pieces you need to add menus at runtime post-load?

Hitz_MAuthor
Inspiring
June 25, 2009

I'm not able to figure out how to add menus at runtime post-load, the suites to be used.

On load the menus are added through pluginStatup but post startup i cant even figure out what caller/interface is used.

Kindly help me with this.

Thanks,

Hitesh

A. Patterson
Inspiring
June 25, 2009

The suites should be the same, namely AIMenu.h's AIMenuSuite. The calls are fairly self-explanatory I think, though if you have questions fire away & hopefully I can help.

The only thing that might be tricky is that it wants a reference to your plugin. Typically you'd do that in response to a selector/caller combination that included a message -- the message always has such a reference. If that's the only thing you're missing, the simple answer is to grab that from one of the early messages and stow it in a static variable somewhere so you can use it later; it won't change, so that's perfectly acceptable.