Alternative to CachedValue<>::Listener?


In the absence of CachedValue<>::Listener, is it acceptable to use 30Hz timers to keep an entire GUI (let’s say 30 sliders for the sake of argument) synced up with a ValueTree state’s properties via attached CachedValue<>s?

Or is it preferable to make the parent of my CachedValue<> members a ValueTree::Listener, replace the CachedValue<>s with their primitive equivalent types, and pass ValueTree::Listener.valueTreePropertyChanged events on to the GUI?

Perhaps there’s an alternative solution that someone smarter than me has come up with?


Normally I’d do this with a ValueTree::Listener that looks out for anything relevant changing in the tree, and only refreshes when that happens,.


Have you seen this thread?


Thanks Adam, I hadn’t - looks good, reading the API now…