I have a series of meters on a component that are created in ascending order. As they’re created, each starts a timer, which is used to gather data and drive the meter.
Their parent component is on a tab, and to save CPU overhead and bandwidth, I’m enabling and disabling the meters as tabs are selected.
For efficency reasons, it’s important that these meters be created and enabled in the same order, so that their timers fire in the right sequence.
I’d like to enable the meters in ascending order, but it turns out that they’re enabled by Component::sendEnablementChangeMessage() in reverse order, which throws a spanner in the works. Is there a reason the loop in that function runs down instead of up? If there’s not, I’d happily override the method in my component subclass, except the function is private.
Is there a clever way around this problem, allowing me to designate the order in which child components are enabled without modifying juce code?