ofxPanel : change default settings file

hello,

I know it is possible to change the default settings file where settings are stored when clicking the disk icon in ofxPanel when using ofxPanel::setup().

But is it possible to change it afterwards ?

What i need is to load settings and see if an option “save localy” is on or off and change the save file name accordingly.

Hope i am clear enough…

thanks

use ofxPanel::saveToFile(string path)

this one writes settings to a specified path right ?
i need to change the path linked to the little disk icon on the top right side of the panel

Hi, yes it writes an xml to the specified path.
Did you try to call ofxPanel::setup(), again? Passing the new path as the second argument.
I don’t know the side effects of this.
On the other hand, there seems to be no ofxPanel::setFilePath(string path) so you might want to modify the class and add this method. this would save to the newly passed filepath when the save icon is pressed.

cheers

hello,

yes i tried calling ofxPanel::setup() again, as expected this messes up the gui.

the only way to achieve that would be to hack the class to add the needed method.

thanks