Custom "modal" windows for use in plugins

hey there.

i'm revisiting my old projects in juce, and the first task i want to do is to replace my old modal dialogs with non modal ones, or better yet, replace them with "kind of modal" ones, so they are only modal in regards to my plugin's ui, not to the whole host.

i want to be able to fetch user inputs from dialogs, without haven to implement the dialogs and callbacks manually, so basicly i want to get the user feedback in the same manner i get it form a modal dialog, namely that the code waits for the modal loop to end until it continiues .

the first naive attempt (a while loop with sleep that waits for a button bress) just locks up the UI thread, but i kind of expeceted that... i just want to ask for some direcrtion, maybe someone thouht of that already?

 

thanks :)

 

cheers

 

jm

i want to get the user feedback in the same manner i get it form a modal dialog, namely that the code waits for the modal loop to end until it continiues .

Sorry, but you're wasting your time even considering this - anything that blocks the UI thread is unsafe.

It might involve a bit more boilerplate code to implement a callback, but that's the only way to do it.

ah, ok, but good to know :) thanks a lot!

 

jm