I understand the goal of the Application.WaitForIdle method (waiting for qlikview to refresh itself before continuing code execution), but I still have a few questions about it.
What is the point of the optional argument ? Documentation says "Optional timeout in milliseconds after which macro execution will resume regardless of idle state or not". When is it useful to wait for the refresh but not enough to let the refresh finishes ?
My second (and most important) question is : "when does it matter to wait for the QlikView refresh ?". So far I have only used it as the "magic remedy" when weird behaviors or errors occur, and sometimes it has worked fine. Is there a way to guess when the problem comes from "qlikview hasn't finished refreshing itself" and when it comes from elsewhere ? In which context is it obvious to wait the idle state before continuing ?