Hey all! I'm a COMPLETE beginner to Processing - like, 2 days now - and I'm completely enjoying it, but I've hit a bit of a stumbling block in one of my first lessons. There's no explanation given in my resource as to what this error message is, why it happens, or how to prevent it.
I've downloaded the Visualizing Data ebook, and the introductory lesson centers around displaying data on a map. Here's the code that I'm getting hung up on:
PImage mapImage;
Table locationTable;
int rowCount;
void setup( ) {
size(640, 400);
mapImage = loadImage("map.png");
// Make a data table from a file that contains
// the coordinates of each state.
locationTable = new Table("locations.tsv"); **** <------ This is where I'm getting the undefined error ****
// The row count will be used a lot, so store it globally.
rowCount = locationTable.getRowCount( );
}
void draw( ) {
background(255);
image(mapImage, 0, 0);
// Drawing attributes for the ellipses.
smooth( );
fill(192, 0, 0);
noStroke( );
// Loop through the rows of the locations file and draw the points.
for (int row = 0; row < rowCount; row++) {
float x = locationTable.getFloat(row, 1); // column 1
float y = locationTable.getFloat(row, 2); // column 2
ellipse(x, y, 9, 9);
}
}
I've followed all instructions in the book to the T, I've added the map.png and locations.tsv files to my sketchbook, and it simply will not load. I just don't know enough about programming languages in general to understand this error or fix it on my own - at least not yet!
Anyone care to take a moment and fill me in? Much appreciated!