[solved] Getting error iterating over a Table
in
Programming Questions
•
6 months ago
Hi, I have a problem using Table class. I'm relatively new to it (saw it in the awesome Jer Thorpe openpaths tutorial).
When trying to iterate over my Table, I keep getting this error:
Can only iterate over an array or an instance of java.lang.Iterable
My program is quite similar to the one provided here:
http://processing.org/learning/data/
Couldn't figure it out myself, googling didn't help.
Here's my code (error in the for loop, line 9):
- void setup() {
- size(640, 480, P3D);
- background(0);
- Table data = loadTable("data/openpaths_roveo.csv");
- data.removeTitleRow();
- for (TableRow row:data) {
- println(row.getFloat("lat"));
- }
- exit();
- }
I'm using Processing 2.0b8.
Thanks!
1