void keyPressed() { if (key=='s') { controlP5.save(); } if (key=='l') { controlP5.load("controlP5.xml"); } }
This is the output when i try to load the xml (previously saved):
ControlP5 0.5.4 infos, comments, questions at http://www.sojamo.de/libraries/controlP5 28-sep-2011 16:19:18 controlP5.ControlP5IOHandler save INFO: ControlP5 writing file data/controlP5.xml to disk. loading (1) 28-sep-2011 16:19:21 controlP5.ControlP5 load INFO: loading controlP5.xml 28-sep-2011 16:19:21 controlP5.ControlP5IOHandler parse GRAVE: Unable to parse file. make sure the file exists. java.lang.NullPointerException java.lang.NullPointerException at controlP5.ControlP5IOHandler.parseController(Unknown Source) at controlP5.ControlP5IOHandler.parse(Unknown Source) at controlP5.ControlP5.load(Unknown Source) at ControlP5chart_test.keyPressed(ControlP5chart_test.java:42) at processing.core.PApplet.handleKeyEvent(PApplet.java:1996) at processing.core.PApplet.dequeueKeyEvents(PApplet.java:1979) at processing.core.PApplet.handleDraw(PApplet.java:1643) at processing.core.PApplet.run(PApplet.java:1530) at java.lang.Thread.run(Thread.java:680)