I have a MenuBarModel and ApplicationCommandTarget. I'd like all commands to be visible in the menu, even is the current target cannot use them. Because some targets are not instantiated right from the start, that means I cannot use ApplicationCommandManager::registerAllCommandsForTarget() and need to register all commands in one place (my main controller).
It seems redundant to have ApplicationCommandTarget::getCommandInfo() fill in the struct with exactly the same information I register a command with in my main controller, but apparently ApplicationCommandTarget::perform() will not be called if I don't do this. I don't like the redundancy and double work here; it seems as if I'm doing something wrong.
What would be the best solution here? Perhaps I'm just working against JUCE's ideal architecture and I just can't see it.
Any help is much appreciated.