NotepadPlusPlusPluginPack.Net
NotepadPlusPlusPluginPack.Net copied to clipboard
SetCommand() has unneeded parameter
SetCommand()
currently takes an index as its first parameter. It uses this to set the _cmdID
field. However, this is a field N++ sets internally. All of my C++ plugins just set the initial value of _cmdID
to 0 and it has always worked fine. Since removing that parameter would break backwards compatibilty with older versions of the plugin pack you may want to wait till a "stable" 1.0 release or just do it now since it is very easy for developers to make the change.
Something else to note, there are cases where you need to store the index, like this example. Instead of making the developer manually count what index it is getting inserted at, you can make SetCommand()
return the newly added index, so that the example I referenced will look like this:
idMyDlg = PluginBase.SetCommand("MyDockableDialog", myDockableDialog);
great maybe it fixes #17
Hmm, not sure if it is related or not. I would think if wrong command IDs are getting used it would run into issues much sooner.