We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have a CSV file. I have loaded it in with loadTable() and I am trying to find which row number has a letter in it with
TableRow result = navTable.findRow(facing, "Room");
However I can't figure out how to get the row number from 'result'. The documentation is extremely vague and confusing,
Can anyone help please?
Thanks,
Mike
Answers
getClass() -> getDeclaredField() -> setAccessible() -> getInt().
"FieldHack.pde":
thank you. it's very useful.
Super explanation, @GoToLoop.
The correct answer is to use findRowIndex() instead of findRow(), which already does exactly what the poster wanted.
@fry It would be very helpful if the information could be added to the public reference. The information already exists in the JavaDoc, but most don't know how to find information there.
We just have to make tradeoffs about how much detail to include in the basic reference, versus all the complete parts in the JavaDoc. If we include everything, people getting started with the Table class get overwhelmed and say "that's not for me." If we include too little, more advanced users get disappointed.
But we change things from time-to-time, for instance: https://github.com/processing/processing-docs/issues/402#issuecomment-260007810
The JavaDoc link is prominently noted in the reference, however: https://processing.org/reference/Table.html And I think at the moment, the page is already pretty overwhelming. See my comment at the Github link—the best solution would also be a tutorial and more information about Table, but I haven't had time to write it, and nobody else has contributed one.
Ok, I guess you're right @fry.
Well, my solution was from Feb 2015. I've got my doubts findRowIndex() existed back then... :-?
That was before a stable release of P3 even existed, if I'm right.