Something that’s been bugging me for a bit …
Generally one keeps UI functions far separate from audioProcessor Callback related functions (naturally, since we don’t want the processor accessing UI methods which are way too slow to try and do every time a callback comes up). This is so obviously the proper paradigm that we have functions like AudioProcessor::createEditor() to show that the processor should CREATE a UI component, not BE a UI component.
So … I thought of it as a fun experiment to see what would happen when I made a component inherit from both the component class and the audioProcessor class, and cause the above function to simply return “this”.
Surprise - no real problems. I keep thinking I am breaking the rules and something bad must happen, but as long as I keep the UI methods well separate from the processor methods, it seems like there is no real issue here.
Now, I’m not planning on doing things this way most of the time, but I was wondering if there are any big drawbacks that I am not seeing here ? … or is it the case that these two classes are kept at arms length more because of convention than necessity?
