Go Back   Cockos Incorporated Forums > Projects > Deprecated REAPER issue tracker > Closed Issue

API: 4 weirdities with custom action sections Issue Tools
issueid=3335 05-04-2011 01:59 AM
Mortal
API: 4 weirdities with custom action sections
KbdSectionInfo from hell

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..
Issue Details
Issue Type Closed Issue
Project Deprecated REAPER issue tracker
Category Plugins
Status Fixed
Priority 5 - Medium
Affected Version 3.73
Closed Version (none)
Yes votes 3
No votes 0
Assigned Users (none)
Tags (none)

05-04-2011 09:41 PM
Human being with feelings
 
And seems like 5) issue is that new user key-bindings get lost after restart.
Reply
05-20-2011 03:26 AM
Mortal
 
^^ key bindings are correctly persisted. after discussion, this 5th issue was in fact due to a liitle thing araud's code..

________

More findings about the initial issues:

Not a prob in my code, me thinks: all 4 issues shown here can also be reproduced with the native action section "MIDI Inline Editor".
Also, see Bernstraw's interesting finding, here, point 3: to me, he's (indirectly) confirming the issue 2 (Grayed "Run/Select" button) of this BR. [EDIT] Well, I mean: you can't trigger inline editor actions even if an inline editor is opened. No idea of what's going on about his toolbar issue, though..

Issues 3 & 4 can be reproduced with other native sections too, eg "Media explorer"
Reply
09-19-2013 02:10 PM
Mortal
 
I think this issue can be marked as fixed, thanks!


Points 3&4 have been silentely fixed/improved. Dunno when exactly, it's ok in 4.5.
Now, those unexpected (*) actions are part of all sections of the action list (and not only when the user creates a macro as reported above), so this is consitent now.
(*) also, when we look more closely to those actions, they are not really "unexpected". For example, an action like "Repeat the most recent action" can make sense in any macro, of any section of the action list...

Points 1&2: forget that! Although it is questionnable, you can get an active "Run" button with the API (a target HWND must be provided)

At last, about my bottom notes, Cockos has added the following API in the meantime:
KbdSectionInfo* (*SectionFromUniqueID)(int uniqueID);

=> it enables many things, thanks!
Reply
Reply

Issue Tools
Subscribe to this issue

All times are GMT -7. The time now is 08:43 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.