I’m faced with a problem in using juce. I’m starting to be OK with sound processing using juce but I still don’t master the UI and Message part of Juce. The solution is probably quite simple but I haven’t found it yet.
I have a UI component (with several buttons).
When I click on one of the button a thread start that make some processing.
At the end of this processing the thread have to warn the UI component that it has finished his job so that the ui component can use the result…
I have tried to run a while loop in the component to wait until the thread have finished. Something like :
but the it blocked the execution of the thread…
I have thought about using Messages but I did not really understand how it works…
In the component (derived from MessageListener) I have my handleMessage method that check if the message is the on I’m waiting for.
If it is not, Should I dispatch the received message ? if yes how ? And then How the thread can send the Message. it have be also a MessageListener and use postMessage ?
Is there a better way to achieve what I want ?
Thanks in advance juce gurus…