This is a very basic question, but I’m inexperienced and can’t work out what to search for.
I have a instance of a class that does most of the work in my application. It is owned by my MainContentComponent, but (so far) does not itself inherit from any juce classes.
It needs to send a simple message (just a ping really) to the MainContentComponent when an event occurs that is not user generated, so the MainContentComponent can update the gui. rather like a button and listener setup.
…indeed the easiest way to do. But because you mention button/listener:
the generic version of this would be ChangeBroadcaster and ChangeListener, if you prefer it plug- and unpluggable.
And the changeMessages will be asynchronous and coalesced (if you want).
I have been passing pointers to arrays between classes like that but passing a pointer to a whole class on another thread was rather more complex. I had to look up how to do forward declaration and also the message manager lock - but it now works!