I’m trying to have one class/instance listen to a whole tree of values and act based on which value changes (and the new value). I thought that listening to the tree that I had set was going to do it, but it doesn’t seem to fire… do I have to listen to each Value I’m interested in? What’s the best way to tell which is which in that case? I thought a tree was going to cover that for me. Do I need to keep a separate array of Values I’m listening to?
This the callback I don’t seem to get, when I create a tree, link it to a control and listen to it:
[code]void MyDevice::valueTreePropertyChanged (ValueTree& treeWhosePropertyHasChanged, const Identifier& property)
if (property.toString() == “Zoom”)
double newZoom = treeWhosePropertyHasChanged.getPropertyAsValue (property, NULL).getValue();