Access GUI text editor from within PluginProcessor.cpp

Hi guys

I have 4 standard files as created by the introducer, i haven’t changed anything, the files are

In the PluginEditor i have created a simple textEditor object using the IntroJucer.

How can i access this text editor from the PluginProcessor.cpp within the processBlock function.

Basically i want to take midi messages and display them in this text editor using the setText function of the textEditor object


Try this for a start:

Thanks Andrew, will have a read

Hi Andrew that link you sent me has alot of Jargon above my pay grade. I just want to access the PluginEditor class from the PluginProcessor class and set the textEditor object to maybe for a start say “Hello from PluginProcessor”…i have tried creating an object of the PluginEditor class and then accessing the textEditor object and using setText but for some reason that doesnt work, the only way to set the text is from within PluginEditor constructor

Yep - some of it does my head in too :wink:

Concentrate on option 1 “use a timerCallback in the AudioProcessorEditor to periodically check the AudioProcessor”. Juce’s audio demo plugin (found in the extras folder) uses this technique and is a good place to start.

Thanks Andrew

You are the man im implementing the solution from the example folder, thanks again. Will let you know how it went

Is the timerCallback and sliderValueChanged Juce methods that juce calls? Im just tryna understand how it is that they work

If you look at PluginEditor.h you’ll see that JuceDemoPluginAudioProcessorEditor inherits from SliderListener and Timer. Read through the linked documentation and examine the demo code and it should all start to make sense.

Got it working. Thanks for all the assistance Andrew. Big things have small beginnings. Is this how you are doing ur GUI updates or did you find a better method than this?

Good news! …and yes, I’m still using the timerCallback method for now.