ofxXmlSettings: settings.getValue

Hi Guys,

Just getting stuck into openframeworks and really enjoying it so far.

I’m trying to pull a value from my settings xml file using settings.getValue. This works fine when I’m dealing with double values but for some reason when I try and pull a string it just gives me the default value. My XML file looks like the following:

<settings>
    <point1X>63.000000000</point1X>
    <point1Y>19.200000763</point1Y>
    <point2X>514.687500000</point2X>
    <point2Y>84.800003052</point2Y>
    <point3X>624.937500000</point3X>
    <point3Y>496.000000000</point3Y>
    <point4X>91.687500000</point4X>
    <point4Y>488.000000000</point4Y>
    <enableFileChooser>true</enableFileChooser>
</settings>

enableFileChooser I’m using as a string and this seems to be the issue.

In my setup function I have this:

settings.loadFile(“settings.xml”);
string fileChoose = settings.getValue(“enableFileChooser”, “test”);

if (fileChoose == “true”) {
ofFileDialogResult vid;
vid = ofSystemLoadDialog();
string vidpath = vid.getPath();
video.load(vidpath);
}

No matter what the value in the XML file it wont get true, it just returns test. point1X for example though returns the correct value without any problems. Is there something I’m missing here?