Problem between ofxXmlSettings & GetOpenFileName (Windows).


I’m not sure this is the good place to ask about that kind of problem but as it is really weird, I was curious to know if someone experienced the same kind of things…

So here’s the deal: I’m using GetOpenFileName to open a dialog box in my application, which is working fine and I’m also using ofxXmlSetting to save the application settings when the user close the application (which is also working really well).

Now the problem is that tinyxml doesn’t save anything after choosing the file with GetOpenFileName! This is already super weird but something even more crazy is that it depend on what kind of file you choose with the Open file dialog!!!

For example if you choose a *.dll or a *.exe, tinyxml will keep saving as it’s supposed to, but if you choose any *.txt, *.xml, *.svg, … files it won’t be able to save xmls anymore!!!

If someone is kind enough to test this for me, I made a small example for codeblocks :

I would be really interested to see if that happens to others also!

All the code is in the keyPressed method!
You can test by pressing “space” and choosing a xml or a text file somewhere on your harddrive. The code is suppose to save a xml file after you choose the file… (and will work or not)

Thanks a lot for any help / test!
Please someone tell me I’m not crazy!