Opening a DocumentWindow in AU

Hello

I’m experiencing a strange behavior in the AU version of my plug-in:

I’m creating a modal DocumentWindow using a timer right after the creation of the main editor window. while it works fine in the VST mode, in the AU version
the window is appearing as semi-transparent without content and the application is blocked.
If I change the document window to be triggered with a button then it works fine, I’ve also tried with longer timer intervals but to no avail.

Can anybody explain this behavior?

Thanks

Agh! never never never run modal loops in a plugin!

Thanks Jules, what about a modal simulation, something that will just ignore clicks and focus on other components, will that be OK?

You can use enterModalState to put a component into a modal state, but just DON’T ever run a modal loop that blocks!