Question: ValueTrees are incredibly useful, and cover functionally what XmlElements offer (but add to that!). The Juce TableListBox uses XmlElements (for both header and data) - is there a ValueTree version of the TableListBox component? If not, any reason why not?
I’m working on a series of plugins in which I store big amounts of dynamic data, which are shown in TableListBoxes. I store the data in Xml and that works great. But having the data in ValueTree object would save me a lot of manual coding that I now need to do to keep the UI up to date when data changes … that’s functionality ValueTrees adds on top of the functional equivalent of Xml … but since I need the TableListBox model I’m stuck with Xml it seems. Or am i?
That seems to indicate that both the header is an XML list, and the data is a list of lists. Am I wrong? If I look at how these things are being populated in the tutorial that also points to XmlElements as internal datamodel.
Ah! Could it be that the tutorial just happens to store the data in Xml? I’m kinda busy right now but if that is the case I could easily refactor the tutorial example to a version that uses ValueTrees instead of Xml! Thx - you’ve given me some inspiration!
Yup - did a quick check: getText() and setText() in the tutorial code copy the data from Xml to table datastructure and vice versa. Should be peanuts to convert to ValueTrees !!!