diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 169032d29..2f4610242 100755 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -6156,6 +6156,7 @@ public class PApplet extends Applet return new JSONObject(new StringReader(input)); } + /** * @webref input:files * @param filename name of a file in the data folder or a URL @@ -6169,6 +6170,12 @@ public class PApplet extends Applet return new JSONObject(createReader(filename)); } + + static public JSONObject loadJSONObject(File file) { + return new JSONObject(createReader(file)); + } + + /** * @webref output:files * @see JSONObject @@ -6191,6 +6198,7 @@ public class PApplet extends Applet return new JSONArray(new StringReader(input)); } + /** * @webref input:files * @param filename name of a file in the data folder or a URL @@ -6204,6 +6212,12 @@ public class PApplet extends Applet return new JSONArray(createReader(filename)); } + + static public JSONArray loadJSONArray(File file) { + return new JSONArray(createReader(file)); + } + + /** * @webref output:files * @see JSONObject diff --git a/core/src/processing/data/Table.java b/core/src/processing/data/Table.java index e942df017..4f8650a21 100644 --- a/core/src/processing/data/Table.java +++ b/core/src/processing/data/Table.java @@ -60,6 +60,7 @@ import processing.core.PConstants; */ public class Table { protected int rowCount; + protected int allocCount; // protected boolean skipEmptyRows = true; // protected boolean skipCommentLines = true; @@ -153,6 +154,7 @@ public class Table { public Table(Iterable rows) { + init(); boolean typed = false; for (TableRow row : rows) { if (!typed) { @@ -1558,6 +1560,7 @@ public class Table { public void setColumnTypes(int[] types) { + ensureColumn(types.length - 1); for (int col = 0; col < types.length; col++) { setColumnType(col, types[col]); } @@ -1573,6 +1576,7 @@ public class Table { * @param dictionary */ public void setColumnTypes(final Table dictionary) { + ensureColumn(dictionary.getRowCount() - 1); int titleCol = 0; int typeCol = 1; if (dictionary.hasColumnTitles()) { diff --git a/core/todo.txt b/core/todo.txt index 1e934c9f2..de76d6a2e 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -1,5 +1,6 @@ 0221 core X fix options parsing on loadTable() to handle spaces +X add static versions of loadJSONObject and loadJSONArray that take File inputs andres X blendMode() change causes OpenGL renderer to be very slow diff --git a/todo.txt b/todo.txt index 274c0e1d0..9312d89df 100644 --- a/todo.txt +++ b/todo.txt @@ -3,6 +3,9 @@ X add double quotes to readlink call, fixes issue w/ paths and spaces X https://github.com/processing/processing/pull/2027 X fix submitted by hamoid +_ changing modes brings the PDE back on the second screen +_ the Find window (also the save windows) also have the same problem + high _ MovieMaker needs to be compiling as 1.6 @@ -45,6 +48,8 @@ _ bring back the splash screen? direct link for download (replace .md5 with .dmg on that page) http://www.java.net/download/jdk7u40/archive/b38/binaries/jre-7u40-ea-bin-b38-macosx-x86_64-07_aug_2013.dmg +http://www.java.net/download/jdk7u40/archive/b40/binaries/jre-7u40-fcs-bin-b40-macosx-x86_64-16_aug_2013.dmg + needs cookie for proper download http://download.oracle.com/otn-pub/java/jdk/7u25-b15/jre-7u25-linux-i586.tar.gz