Sequence of CommandListener events

I assume that the intention is to invoke methods commandStarted()/beforeCommandFinished()/commandFinished() in sequence, so the listener gets commandStarted, then beforeCommandFinished and commandFinished. Experimenting with CommandListener I found out that it is not always true, and sometimes I get a sequence like this:
- commandStarted
- beforeCommandFinished
- commandFinished
- beforeCommandFinished
- commandFinished
- commandStarted

for the same command. I guess it was caused by me displaying a message box inside commandFinished(). It looks like CommandProcessorEx.enterModal() intervenes and breakes the assumed sequence. Is it a bug, and the sequence must always be commandStarted()/beforeCommandFinished()/commandFinished()?

Please sign in to leave a comment.