i have a question: inside perform is good if a command invokeDirectly another command in the same perform ? or is better to call invoke from the command manager ?
while debugging i found this:
[code]bool ApplicationCommandTarget::invoke (const InvocationInfo& info, const bool async)
{
ApplicationCommandTarget* target = this;
int depth = 0;
while (target != 0)
{
if (target->tryToInvoke (info, async))
return true;
target = target->getNextCommandTarget();
jassert (depth < 100); // could be a recursive command chain??
jassert (target != this); // definitely a recursive command chain!
if (depth > 100 || target == this)
break;
}
if (target == 0)
{
target = JUCEApplication::getInstance();
if (target != 0)
return target->tryToInvoke (info, async);
}
return false;
}[/code]
shouldn’t depth be incremented before asserting ?