I’m using ValueTree
objects in conjunction with ValueTreeSynchroniser
to keep multiple ValueTree’s in sync over local network. In this case I’m talking about a server process and a couple of client processes.
When the local (client-side) ValueTree changes (by changing a UI element for instance) the ValueTreeSynchroniser sends that update to the server (via ValueTreeSynchroniser::stateChanged()
). The server forwards the update to the other connected clients. When the client receives an update it applies it to the ValueTree which triggers the stateChanged() method again, which sends the update to the server which forwards the update to the other connected clients… You can see where this is going, we end up in a loop.
I’m looking for a way to find out (within ValueTreeSynchroniser
) wether the ValueTree
changed by an applyUpdate() or another kind of update (local property changed for instance). Is this possible?