Change Slider visibility on runtime from PluginProcessor


#1

Hi All! I’m returning to Juce from a bit of time.
Trying to change the visibility of a slider from the PluginProcessor class.
Is it possible?


#2

It’s obviously possible (get the active editor, cast it to your editor class and check that it is not a null pointer) but you should really do the actual GUI state manipulation from the GUI side. Doing that kind of stuff in the AudioProcessor has risks like forgetting to do the null pointer check for the editor (the plugin might not have the editor created at all times) and doing GUI object calls from the audio thread, which is not allowed.


#3

It’s probably safest to set a flag in your plugin processor and use a timer in your GUI to read it from the processor.


#4

Thank’s onqel, I’ll try your way…