Hello!
it might be to late, but i have found a bug in the squirrel binding:
if my squirrel script (registered as plugin) creates a menu entry, and if i reload (open an register) the srcript a second time it wont be actualized to the new script.
It calls the old one.
in wxArrayInt CreateMenu(const wxString& name)
int id = wxNewId();
mi.CreateFromString(arr[i], id);
Here the menue entry is "not" created because it exists:
// existing menu
// if it is the final item we want to create, display error and stop
if (isLast || existing >= (int)menu->GetMenuItemCount())
return 0;
so a easy fix would be to add a bool parameter who signals to overwrite the old menu entry, or we ask at the script loading if the existing menu entry should be overwritten.
Probably it should be overwritten if the old and the new plugin had the same name...
Or we need in the menumanager a function to delete a menu so we can call it, when the plugin is unregistered (but how we find the right menu entry?).
greetings