We are about to switch to a new forum software. Until then we have removed the registration on this forum.
My CSV file is all right AFAIK. So why does this:
Table states;
TableRow row;
void setup() {
states = new Table();
states = loadTable("states.csv", "header");
TableRow row = states.getRow(0);
}
void draw() {
println(row.getInt("sides"));
}
get me a NullPointerException?
Answers
Line 2 and line 7 conflicts. One overshadow the other one.
Kf
You're redeclaring field row as a local variable inside setup(), temporarily overshadowing the original! :-@
https://forum.Processing.org/two/discussions/tagged/redeclaration
3:-O
Thanks