We are about to switch to a new forum software. Until then we have removed the registration on this forum.
First time using the loadTable method in p5 and I can't figure out what I'm missing.
I'm using rowCount to verify the table is loaded, but other p5.Table methods aren't working either. The file is in my data folder and the csv has plenty of rows.
var here = loadTable('here.csv', 'header');
var rowCount = here.getRowCount();
print(rowCount);
Returns:
0
2908: Uncaught TypeError: object is not a function
Answers
In general, loading functions in JS doesn't block. That is, it happens asynchronously in another thread.
Better read about preload() callback: http://p5js.org/reference/#/p5/preload
yup, and in addition to preload, there is one other option which is to use a callback. check out this overview of both: https://github.com/lmccart/p5.js/wiki/p5.js-overview#callbacks
Works like a charm - Thank you!!!