Here are 4 weirdities one can face when he has registered his own action section (which is possible with the current API thanks to reaper_plugin_info_t.Register("accel_section",KbdS ectionInfo*)). This occurs in v3 and v4. For repro of the issues shown here with the "S&M extension" section, please install the SWS extension.
Here we go:
Issue 1) The user can enter key shortcuts but those ones are never trigerred.
tech. note: in other words, KbdSectionInfo.onAction(int,int,int,int,HWND) never called and I can't see any way to "attach" a HWND to a KbdSectionInfo
Issue 2) (may be the same than 1, just in case..) whatever action is selected in a such a section, the "Run" button is always grayed
Issue 3) "create custom action" dlg contains unrelated actions as shown in the pic
Issue 4) (may be the same than 3, just in case..) The extension section can be corrupted.
Repro:
- show action list, select the "S&M Extension" section
- click 'new'
=> the "create custom action" dlg is opened (with issue 3)
- click cancel in that dlg
(now just for refresh..)
- in the action list, select the "Main" section
- in the action list, select the "S&M Extension" section
=> the unrelated actions we saw in the "create custum action" dlg are now part of the "S&M Extension" (!)
Note:
I think the way that example section is registered is the good one but it's a bit like "pioneer" code => of course, it's possible the bugs are on my side, please let me know if it is the case ! That code is open source here:
http://code.google.com/p/sws-extensi...nM_Actions.cpp
Optionnal note on the note:
in that code, command ids are get through plugin_register("command_id", (void*)ct->id))) (which is documented as for the "main section") but I felt it was better than "inventing" cmd ids and there's nothing in the API that would allow us registering an action id in an other section than the main one ;-)
Very optionnal note on the optionnal note of the note:
it would be great to have a mean to get a given KbdSectionInfo*, e.g. KbdSectionInfo* getSectionByName(const char*) or whatever..