Hi,
I have just added the below function to my ApplicationCommandManager subclass and thought it might be a worthy addition to JUCE proper. I use it in destructors to clean up commands when components go away.
[code]void ApplicationCommandManager::removeAllCommandsForTarget(ApplicationCommandTarget* target)
{
if (target) {
Array commandIDs;
target->getAllCommands(commandIDs);
for (int i = 0; i < commandIDs.size(); i++)
removeCommand(commandIDs[i]);
}
}
[/code]