Hello, all and sundry. Sorry for no word recently but I’m still on the last phases on this programming project, I probably shan’t have time to get relaxed here for a month or more.
I keep creating the same sort of bug in different ways. If you think of my data as a “model” and my Juce components being the “view”, the issue is that I get a feedback loop between the model and the view, or between the model and itself, and one that’s often hidden from me by the MessageQueue.
My application is a simple data driven system. Many different things can change the data, which then broadcasts those changes to all its consumers. Setting the data without sending out updates is not possible nor a good strategy - there’s a guarantee that all clients are always aware of the almost-current state of their data. The data can’t contain cycles so feedback loops just aren’t possible.
I want my Juce View to be the “slave” of the data… so whenever possible I use the non-propagating version of Juce calls - except a lot of the time (particularly in the Tables) there aren’t such calls. I have various mechanisms to filter… but…
I also am careful not to trigger my updates unless the variable has “really changed” but that’s work, I initially had troubles the other way where I wasn’t getting updates at all, and another one where there was a numerical instability so a GUI component’s location “wobbled” (the layout operation wasn’t actually idempotent).
When I run into a problem more than once, I always look for a systematic solution to it. But nothing has come to mind here. Your ideas are welcome!