diff --git a/android/core/src/processing/data/Table.java b/android/core/src/processing/data/Table.java index 339f3e49d..d493b7b1e 100644 --- a/android/core/src/processing/data/Table.java +++ b/android/core/src/processing/data/Table.java @@ -1801,7 +1801,8 @@ public class Table { public int getInt(int row, int column) { checkBounds(row, column); - if (columnTypes[column] == INT) { + if (columnTypes[column] == INT || + columnTypes[column] == CATEGORICAL) { int[] intData = (int[]) columns[column]; return intData[row]; } diff --git a/core/src/processing/data/Table.java b/core/src/processing/data/Table.java index 339f3e49d..d493b7b1e 100644 --- a/core/src/processing/data/Table.java +++ b/core/src/processing/data/Table.java @@ -1801,7 +1801,8 @@ public class Table { public int getInt(int row, int column) { checkBounds(row, column); - if (columnTypes[column] == INT) { + if (columnTypes[column] == INT || + columnTypes[column] == CATEGORICAL) { int[] intData = (int[]) columns[column]; return intData[row]; } diff --git a/core/todo.txt b/core/todo.txt index a60ebf661..f73b7ae9c 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -139,6 +139,8 @@ _ getColumnType() - what should it return? _ Integer.TYPE, String.class? still nothing for categorical _ maybe it's Table.INT since it's for advanced users anyway _ problem is loading types from file, no way to access it from code +_ getInt() on categorial to return index? +_ getCategories() and getCategory() methods to query names? shape _ major surgery to put loadShape() back into PApplet/PGraphics