A fix for TableListBox tutorial

The TableListBox tutorial seems old enough to have functions that don’t even appear in the documentation or here in forum and which will trigger errors. Speficically this line that appears twice:

for (auto* columnXml : columnList->getChildIterator())

Which should be replaced by:

for (auto* columnXml = columnList->getFirstChildElement();
             columnXml != nullptr;
             columnXml = columnXml->getNextElement())

Or using the “neater” forEachXmlChildElement macro. Doing that compiles and runs fine, at least on macOS & Juce 6.

2 Likes

I just updated Juce to 6.0.8, and tried it with a freshly downloaded TableListBox tutorial, and it compiled without errors.

Additionally, the forEachXmlChildElement macro has now been deprecated. I used that one quite a bit!