diff --git a/core/src/processing/data/Table.java b/core/src/processing/data/Table.java index 878bf8719..27e28df46 100644 --- a/core/src/processing/data/Table.java +++ b/core/src/processing/data/Table.java @@ -33,6 +33,7 @@ import java.util.*; import processing.core.PApplet; import processing.core.PConstants; +import quicktime.streaming.SettingsDialog; // function that will convert awful CSV to TSV.. or something else? // maybe to write binary instead? then read the binary file once it's ok? @@ -270,14 +271,21 @@ public class Table { if (rowCount == 0) { setRowCount(10); } - int prev = 0; //-1; + //int prev = 0; //-1; while ((line = reader.readLine()) != null) { if (row == getRowCount()) { setRowCount(row << 1); } - setRow(row, tsv ? PApplet.split(line, '\t') : splitLineCSV(line)); - row++; + if (row == 0 && header) { + setColumnTitles(tsv ? PApplet.split(line, '\t') : splitLineCSV(line)); + header = false; + } else { + setRow(row, tsv ? PApplet.split(line, '\t') : splitLineCSV(line)); + row++; + } + /* + // this is problematic unless we're going to calculate rowCount first if (row % 10000 == 0) { if (row < rowCount) { int pct = (100 * row) / rowCount; @@ -292,6 +300,7 @@ public class Table { e.printStackTrace(); } } + */ } // shorten or lengthen based on what's left if (row != getRowCount()) { diff --git a/core/todo.txt b/core/todo.txt index daf845565..de73aa4ec 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -9,6 +9,8 @@ o hint(OPENGL_ERRORS) should be the opposite to enable the reporting, no? o hint(ENABLE_OPENGL_ERRORS) should be the hint.. disabled by default X nah, just leave these turned on since (potentially) important X fix table loading quirk with extensions +_ PImage.resize() greater than loaded image size hangs Java App +_ http://code.google.com/p/processing/issues/detail?id=1463 cleaning/earlier C textureWrap() CLAMP and REPEAT now added