TableListBox throws an exception (solved)

I am in the process learning Juce/C ++ and have therefore gone through a number of the published tutorials. Now I have encountered a problem with the TableListBox tutorial. An exception is thrown if a value in ITEM contains the sign &. Like this:

The read access violation occurs in “juce_LinkedListPointer.h”:
/ ** Returns the item which this pointer points to. * /
inline ObjectType * get () const noexcept
{
return item;
}

Unfortunately, my C ++ skills have come so far that I know how to solve this. Any tips / suggestions?

What do you mean?

There?

<DATA>
    <ITEM ID="01" Module="juce_module" Name="JUCE example classes" Version="5.2.0" License="ISC" Groups="2" Dependencies="1" Description="..." Select="0"/>
    //...
</DATA>

You should join the buggy code.

Sorry. I pasted the example but it dissapeared. New try:

<DATA>
  <ITEM ID="429" Name="Core Synth - Beauty & Strings" Library= "Ethera Gold 2.5"/>
  //...
</DATA>
1 Like

Found a solution. The problem is & in xml. By changing it to & it doesn’t crash.

1 Like

:thinking:

Could you be more precise? :wink:

I changed the way I create the source xml-file so that & is written as &amp;.

The ITEM row now looks like this:

<DATA>
  <ITEM ID="429" Name="Core Synth - Beauty &amp; Strings" Library= "Ethera Gold 2.5"/>
  //...
</DATA>
1 Like

A good things to know when you manually edit xml document (of course that should not be done). :laughing: