# A fix for TableListBox tutorial

**URL:** <https://forum.juce.com/t/a-fix-for-tablelistbox-tutorial/44668>\
**Category:** General JUCE discussion\
**Created:** [February 26, 2021, 12:27am UTC](https://forum.juce.com/t/a-fix-for-tablelistbox-tutorial/44668 "2021-02-26T00:27:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![johngalt91](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@johngalt91](https://forum.juce.com/u/johngalt91)\
**Post date:** [February 26, 2021, 12:27am UTC](https://forum.juce.com/t/a-fix-for-tablelistbox-tutorial/44668/1 "2021-02-26T00:27:17Z")

</div>

The [TableListBox tutorial](https://docs.juce.com/master/tutorial_table_list_box.html) 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.

---

<div class="post-metadata">

**Author:** ![refusesoftware](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/refusesoftware/32/20561_2.png) [@refusesoftware](https://forum.juce.com/u/refusesoftware)\
**Post date:** [April 3, 2021, 12:13am UTC](https://forum.juce.com/t/a-fix-for-tablelistbox-tutorial/44668/2 "2021-04-03T00:13:42Z")

</div>

I just updated Juce to 6.0.8, and tried it with a freshly downloaded [TableListBox tutorial](https://docs.juce.com/master/tutorial_table_list_box.html), and it compiled without errors.

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