prisonerjohn / processing-web

0 stars 0 forks source link

[CLOSED] saveTable writes duplicate rows! #100

Open prisonerjohn opened 10 years ago

prisonerjohn commented 10 years ago

Issue by gratefulfrog Sunday Apr 14, 2013 at 13:13 GMT Originally opened as https://github.com/processing/processing-web/issues/100


I am sorry to report what seems to be an incredible problem with the saveTable() method.

void setup(){
  Table t =  createTable();
  t.addColumn("x");
  t.addColumn("y");
  TableRow newRow = t.addRow();
  newRow.setString("x", "a");
  newRow.setString("y", "b");
  saveTable(t,"data/data.csv", "csv"); 
}
void draw(){} 

Gives a file that looks like this:

$ cat data.csv
x,y
a,b
x,y
a,b
$

There is a workaround, though! Do not specify the file type, let processing guess by the extension!... saveTable(t,"data/data.csv");

produces:

$ cat data.csv
x,y
a,b
$
prisonerjohn commented 10 years ago

Comment by REAS Wednesday Apr 17, 2013 at 17:01 GMT


This is an issue for processing/processing, not processing/processing-web because it's not a documentation issue. Please post it there. I'm going to close it here.