zoomx / controlp5

Automatically exported from code.google.com/p/controlp5
0 stars 0 forks source link

[BUG ]NullPointerException when loading chart #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This sketch produces NullPointerException when loading the chart controller:

What is the expected output? What do you see instead?

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)

What version of the product are you using? On what operating system?
0.5.4 in Snow leopard

The Sketch demostrating bug:

//################
import controlP5.*;
ControlP5 controlP5;
Chart myChart;

void setup() {
  size(600, 400);
  controlP5 = new ControlP5(this);
  myChart = controlP5.addChart("Hello", 20, 20, 400, 100);
}

void draw() {
  background(0);
}

void keyPressed() {
  if (key=='s') {
    controlP5.save();
  }
  if (key=='l') {
    controlP5.load("controlP5.xml");
  }
}
//################

Original issue reported on code.google.com by acampada...@gmail.com on 28 Sep 2011 at 2:23

Attachments:

GoogleCodeExporter commented 9 years ago
Hi, save-to and load-from an xml file has been removed with later than 0.6.0 
versions of controlp5 and has been replace with the implementation of 
ControllerProperties.

Original comment by soj...@gmail.com on 7 Oct 2011 at 1:22