Closed allen6chen closed 2 years ago
The error message should show you the headers in the Row vs in your Table. Then you can see where the discrepancy is.
But looking at your code, probably you want to add a new row each time? In that case, create a new row:
//The following code is in **global vairable:**
Line 1: UXFDataTable continuousDataTable = new UXFDataTable("Exact moment of pressing key","Pressed key");
Line 2: UXFDataRow dataTableResponse = new UXFDataRow(); // this is not needed...
Line 3: private float exact_moment;
Line 4: private string keycode;
//The following code is in **a method**:
Line X: UXFDataRow dataTableResponse = new UXFDataRow(); // <-- make new row
Line 5: dataTableResponse.Add(("Exact moment of pressing key", exact_moment));
Line 6: dataTableResponse.Add(("Pressed key", keycode));
Line 7: continuousDataTable.AddCompleteRow(dataTableResponse);
``
Thank you so much for the response Jack
Hi, when I try to call a new UXFDataTable, I directly use string to represent the headers of the data table and . my code:
Different from your example code:
https://github.com/immersivecognition/unity-experiment-framework/wiki/Collect-Custom-Data
But it seems like when I try to use
UXF.UXFDataTable.AddCompleteRow()
, the console will produce the following error:I'm guessing it's because I didn't assign the headers as the string variable like in your example (Line 1 and Line 9), which UXF couldnt compare two same string like line 1 and line 5.
Since I want to keep acccessing the already created table to update while I run the experiment, do you know is there any way that I can do that?
Thank you in advance :)