hello~! i’m new to OF and trying to learn some basics, and i’m having some issues loading the preset i saved before.
here is my code in the key events functions.
// --------------------------
if ( key == ‘s’ ) {
ofFileDialogResult res;
res = ofSystemSaveDialog( “preset.xml”, “Saving Preset”);
if ( res.bSuccess ) gui.saveToFile( res.filePath );
}
if ( key == ‘l’ ) {
ofFileDialogResult res;
res = ofSystemLoadDialog( “Loading Preset” );
if ( res.bSuccess ) gui.loadFromFile( res.filePath );
}
// --------------------
in this case, My preset is saved properly in the data folder so that i can open the xml and read the values, which i guess the save part works. but when i try to load that by pressing key ‘l’, it allows me to choose the file through a dialog and nothing happens but my OF freezes. Need some help with that.
'm using Mac, and Xcode 6.4 with of 0.8.4.
thanks you