Change Slider visibility on runtime from PluginProcessor

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?

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.

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.

1 Like

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