Author Topic: Plugin::BuildMenu (wxMenuBar*) never gets called [resolved]  (Read 4748 times)

Offline stardust

  • Multiple posting newcomer
  • *
  • Posts: 55
    • http://www.hightec-rt.com
Plugin::BuildMenu (wxMenuBar*) never gets called [resolved]
« on: March 02, 2007, 10:43:36 am »
Hi,

in a plugin, I intend to make changes to the main menu.

The plugin compiles and can be installed without problems and appears in the "Plugins" submenu. I created the plugin with a wizard and checked the "plugin changes menu" box.

However, the auto-created method ::BuildMenu(wxMenuBar*) never gets called even though I can see the "Updating menu..." progress bar.

I rather expected adding/removing menu items, toolbottons and the like in ::OnAttach/::OnDetach, i.e. when initializing/deinitializing the plugin. Even if ::BuildMenu was called I would not know wether I had to add the items or to remove them...

This applies to both under linux and windows. So I obviously have some misunderstandings of what a plugin is or what is not, and what it's limitations are?

svn is 3655 (linux) resp. 3652 (win)

« Last Edit: March 02, 2007, 01:44:07 pm by stardust »
Own SVN builds (quite new) • SuSE Linux 10.0 • Linux kernel 2.6.13-15-default
gcc 4.0.2 (20050901)
wxGTK-2.6.1.0-4 • KDE 3.4.2b • gtk2 2.8.3-4

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Plugin::BuildMenu (wxMenuBar*) never gets called
« Reply #1 on: March 02, 2007, 01:02:13 pm »
Your plugin inherits from cbToolPlugin. This plugin type doesn't receive events for menus/toolbar. Change your plugin class to inherit from cbPlugin if you want full access.
Be patient!
This bug will be fixed soon...

Offline stardust

  • Multiple posting newcomer
  • *
  • Posts: 55
    • http://www.hightec-rt.com
Re: Plugin::BuildMenu (wxMenuBar*) never gets called
« Reply #2 on: March 02, 2007, 01:43:49 pm »
Thanks, that's it!

Works fine now.
Own SVN builds (quite new) • SuSE Linux 10.0 • Linux kernel 2.6.13-15-default
gcc 4.0.2 (20050901)
wxGTK-2.6.1.0-4 • KDE 3.4.2b • gtk2 2.8.3-4