Apologies in advance for the potentially daft question, but I'm struggling to work out the best way to solve the following problem:
I've created a class that derives from Label and has a member Value (relating to a plugin parameter). The idea is that if the Value is changed (e.g. when an slider/combobox that is attached to the same Value changes), the Label's text is updated accordingly*.
I can't make use of Label's inheritance of the Value::Listener, as that's private, hence getting the following error when trying to add my class as a listener to the particular Value:
Error 1 error C2243: 'type cast' : conversion from 'BCMLabel *const ' to 'juce::Value::Listener *' exists, but is inaccessible
I was able create a similar class deriving from ComboBox, but in that case, ComboBox inherits from ValueListener "public"ly. I can get the code to compile if I go with:
class BCMLabel : public Label, public ValueListener
However, I get compiler warnings and it doesn't really seem like the right thing to do... especially as it doesn't compile if I replace ValueListener with Value::Listener.
* I'm happy to explain why I want to be able to do this, but didn't want to bloat the question.