From 316a600a9d0991c0d18246b2d32e4fc07a045cd6 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Fri, 11 Oct 2013 19:15:01 -0400 Subject: [PATCH] looking for a better solution here --- core/src/processing/core/PApplet.java | 16 +++++++++++++++- core/todo.txt | 3 ++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 3bd550fa4..9e6e20b4a 100755 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -4431,7 +4431,7 @@ public class PApplet extends Applet System.out.println(); } - // + /** * @param what boolean, byte, char, color, int, float, String, Object */ @@ -4477,11 +4477,25 @@ public class PApplet extends Applet static public void println(Object... variables) { +// System.out.println("got " + variables.length + " variables"); print(variables); println(); } + /* + // Breaking this out since the compiler doesn't know the difference between + // Object... and just Object (with an array passed in). This should take care + // of the confusion for at least the most common case (a String array). + static public void println(String[] array) { + for (int i = 0; i < array.length; i++) { + System.out.println("[" + i + "] \"" + array[i] + "\""); + } + System.out.flush(); + } + */ + + static public void println(Object what) { if (what == null) { // special case since this does fuggly things on > 1.1 diff --git a/core/todo.txt b/core/todo.txt index 8fde85231..5b4901c66 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -16,7 +16,8 @@ X Java2D images crash after being resized X https://github.com/processing/processing/issues/2113 X constrain lerpColor() between 0 and 1 X allow println() and print() to take varargs -X https://github.com/processing/processing/issues/2056 +o https://github.com/processing/processing/issues/2056 +_ causes conflict with printing arrays _ JSONObject/Array.format(-1) not working on embedded JSONObjects _ should be a quick fix, notes are in the report