@@ -774,7 +774,11 @@ void ofxVisualProgramming::resetObject(int &id){
774774 }
775775 }
776776
777+ #if OF_VERSION_MAJOR == 0 && OF_VERSION_MINOR < 12
777778 XML.saveFile ();
779+ #else
780+ XML.save ();
781+ #endif
778782
779783 }
780784 }
@@ -902,7 +906,11 @@ void ofxVisualProgramming::deleteObject(int id){
902906 // remove object
903907 if (found){
904908 XML.removeTag (" object" , targetID);
905- XML.saveFile ();
909+ #if OF_VERSION_MAJOR == 0 && OF_VERSION_MINOR < 12
910+ XML.saveFile ();
911+ #else
912+ XML.save ();
913+ #endif
906914 }
907915 }
908916
@@ -1077,7 +1085,11 @@ void ofxVisualProgramming::removeObject(int &id){
10771085 // remove object
10781086 if (found){
10791087 XML.removeTag (" object" , targetID);
1080- XML.saveFile ();
1088+ #if OF_VERSION_MAJOR == 0 && OF_VERSION_MINOR < 12
1089+ XML.saveFile ();
1090+ #else
1091+ XML.save ();
1092+ #endif
10811093 }
10821094 }
10831095
@@ -1243,7 +1255,11 @@ void ofxVisualProgramming::newPatch(string release){
12431255 ofxXmlSettings XML;
12441256 if (XML.loadFile (fileToRead.getAbsolutePath ())){
12451257 XML.setValue (" release" ,release);
1246- XML.saveFile ();
1258+ #if OF_VERSION_MAJOR == 0 && OF_VERSION_MINOR < 12
1259+ XML.saveFile ();
1260+ #else
1261+ XML.save ();
1262+ #endif
12471263 }
12481264
12491265 ofFile newPatchFile (ofToDataPath (" temp/" +newFileName,true ));
@@ -1525,7 +1541,11 @@ void ofxVisualProgramming::loadPatch(string patchFile){
15251541 XML.setValue (" sample_rate_out" ,audioSampleRate);
15261542 XML.setValue (" input_channels" ,audioGUIINChannels);
15271543 XML.setValue (" output_channels" ,audioGUIOUTChannels);
1544+ #if OF_VERSION_MAJOR == 0 && OF_VERSION_MINOR < 12
15281545 XML.saveFile ();
1546+ #else
1547+ XML.save ();
1548+ #endif
15291549
15301550 for (size_t bs=0 ;bs<audioDevicesBS.size ();bs++){
15311551 if (ofToInt (audioDevicesBS.at (bs)) == audioBufferSize){
@@ -1734,7 +1754,11 @@ void ofxVisualProgramming::setPatchVariable(string var, int value){
17341754 if (XML.loadFile (currentPatchFile)){
17351755 if (XML.pushTag (" settings" )){
17361756 XML.setValue (var,value);
1757+ #if OF_VERSION_MAJOR == 0 && OF_VERSION_MINOR < 12
17371758 XML.saveFile ();
1759+ #else
1760+ XML.save ();
1761+ #endif
17381762 XML.popTag ();
17391763 }
17401764 }
0 commit comments