diff --git a/app/src/processing/mode/java/AutoFormat.java b/app/src/processing/mode/java/AutoFormat.java
index 1f78fc67d..f98e6509d 100644
--- a/app/src/processing/mode/java/AutoFormat.java
+++ b/app/src/processing/mode/java/AutoFormat.java
@@ -36,10 +36,10 @@ import processing.core.PApplet;
* Contributed by Martin Gomez, additional bug fixes by Ben Fry.
* Additional fixes by Jonathan Feinberg in March 2010.
*
- * After some further digging, this code in fact appears to be a modified
- * version of Jason Pell's GPLed "Java Beautifier" class found
+ * After some further digging, this code in fact appears to be a modified
+ * version of Jason Pell's GPLed "Java Beautifier" class found
* here.
- * Which is itself based on code from Van Di-Han Ho from
+ * Which is itself based on code from Van Di-Han Ho from
* here.
* [Ben Fry, August 2009]
*/
@@ -73,8 +73,8 @@ public class AutoFormat implements Formatter {
private char c;
private final Stack castFlags = new Stack();
-
-
+
+
private void comment() {
final boolean save_s_flg = s_flag;
@@ -101,7 +101,7 @@ public class AutoFormat implements Formatter {
return;
}
-
+
private char get_string() {
char ch;
while (true) {
@@ -129,7 +129,7 @@ public class AutoFormat implements Formatter {
}
}
-
+
private void writeIndentedLine() {
if (buf.length() == 0) {
if (s_flag) {
@@ -154,7 +154,7 @@ public class AutoFormat implements Formatter {
buf.setLength(0);
}
-
+
private void writeIndentedComment() {
final boolean saved_s_flag = s_flag;
if (buf.length() > 0) {
@@ -186,7 +186,7 @@ public class AutoFormat implements Formatter {
}
}
-
+
private void handleSingleLineComment() {
c = next();
while (c != '\n') {
@@ -198,7 +198,7 @@ public class AutoFormat implements Formatter {
s_flag = true;
}
-
+
private void printIndentation() {
if (tabs < 0) {
tabs = 0;
@@ -212,7 +212,7 @@ public class AutoFormat implements Formatter {
}
}
-
+
private char peek() {
if (pos + 1 >= chars.length) {
return 0;
@@ -220,10 +220,10 @@ public class AutoFormat implements Formatter {
return chars[pos + 1];
}
-
+
private char lastNonWhitespace = 0;
-
+
private int prev() {
return lastNonWhitespace;
}
@@ -272,7 +272,7 @@ public class AutoFormat implements Formatter {
if_flg = true;
}
-
+
/* read to new_line */
private boolean getnl() {
final int savedTabs = tabs;
@@ -306,7 +306,7 @@ public class AutoFormat implements Formatter {
return false;
}
-
+
private boolean lookup(final String keyword) {
return Pattern.matches("^\\s*" + keyword + "(?![a-zA-Z0-9_&]).*$", buf);
}
@@ -316,8 +316,8 @@ public class AutoFormat implements Formatter {
final String regex = "^\\s*" + keyword.replaceAll("\\*", "\\\\*") + ".*$";
return Pattern.matches(regex, buf);
}
-
-
+
+
private void trimRight(final StringBuilder sb) {
while (sb.length() >= 1
&& Character.isWhitespace(sb.charAt(sb.length() - 1)))
@@ -430,9 +430,8 @@ public class AutoFormat implements Formatter {
tabs--;
}
trimRight(buf);
- if (buf.length() > 0
- || (result.length() > 0 && !Character.isWhitespace(result
- .charAt(result.length() - 1))))
+ if (buf.length() > 0 ||
+ (result.length() > 0 && !Character.isWhitespace(result.charAt(result.length() - 1))))
buf.append(" ");
buf.append(c);
writeIndentedLine();
diff --git a/app/src/processing/mode/java/JavaBuild.java b/app/src/processing/mode/java/JavaBuild.java
index 2e47f5f54..91639a788 100644
--- a/app/src/processing/mode/java/JavaBuild.java
+++ b/app/src/processing/mode/java/JavaBuild.java
@@ -263,6 +263,7 @@ public class JavaBuild {
File outputFolder = (packageName == null) ?
srcFolder : new File(srcFolder, packageName.replace('.', '/'));
outputFolder.mkdirs();
+// Base.openFolder(outputFolder);
final File java = new File(outputFolder, sketch.getName() + ".java");
final PrintWriter stream = new PrintWriter(new FileWriter(java));
try {
@@ -276,7 +277,6 @@ public class JavaBuild {
throw new SketchException(msg);
} catch (antlr.RecognitionException re) {
// re also returns a column that we're not bothering with for now
-
// first assume that it's the main file
// int errorFile = 0;
int errorLine = re.getLine() - 1;
diff --git a/app/src/processing/mode/java/preproc/PdePreprocessor.java b/app/src/processing/mode/java/preproc/PdePreprocessor.java
index 1d7d29879..270f9a328 100644
--- a/app/src/processing/mode/java/preproc/PdePreprocessor.java
+++ b/app/src/processing/mode/java/preproc/PdePreprocessor.java
@@ -828,28 +828,29 @@ public class PdePreprocessor {
*/
protected void writeFooter(PrintWriter out, String className) {
if (mode == Mode.STATIC) {
- // close off draw() definition
- out.println(indent + "noLoop();");
- out.println("} ");
+ // close off setup() definition
+ out.println(indent + indent + "noLoop();");
+ out.println(indent + "}");
+ out.println();
}
if ((mode == Mode.STATIC) || (mode == Mode.ACTIVE)) {
if (sketchWidth != null && !hasMethod("sketchWidth")) {
// Only include if it's a number (a variable will be a problem)
- if (PApplet.parseInt(sketchWidth, -1) != -1 || sketchWidth.equals("displayWidth")) {
+ if (PApplet.parseInt(sketchWidth, -1) != -1 || sketchWidth.equals("displayWidth")) {
out.println(indent + "public int sketchWidth() { return " + sketchWidth + "; }");
}
}
if (sketchHeight != null && !hasMethod("sketchHeight")) {
// Only include if it's a number
- if (PApplet.parseInt(sketchHeight, -1) != -1 || sketchHeight.equals("displayHeight")) {
+ if (PApplet.parseInt(sketchHeight, -1) != -1 || sketchHeight.equals("displayHeight")) {
out.println(indent + "public int sketchHeight() { return " + sketchHeight + "; }");
}
}
if (sketchRenderer != null && !hasMethod("sketchRenderer")) {
// Only include if it's a known renderer (otherwise it might be a variable)
- if (sketchRenderer.equals("P2D") ||
- sketchRenderer.equals("P3D") ||
+ if (sketchRenderer.equals("P2D") ||
+ sketchRenderer.equals("P3D") ||
sketchRenderer.equals("OPENGL") ||
sketchRenderer.equals("JAVA2D")) {
out.println(indent + "public String sketchRenderer() { return " + sketchRenderer + "; }");
@@ -857,8 +858,9 @@ public class PdePreprocessor {
}
if (!hasMethod("main")) {
- out.println(indent + "static public void main(String args[]) {");
- out.print(indent + indent + "PApplet.main(new String[] { ");
+ out.println(indent + "static public void main(String[] passedArgs) {");
+ //out.print(indent + indent + "PApplet.main(new String[] { ");
+ out.print(indent + indent + "String[] appletArgs = new String[] { ");
if (Preferences.getBoolean("export.application.fullscreen")) {
out.print("\"" + PApplet.ARGS_FULL_SCREEN + "\", ");
@@ -878,7 +880,14 @@ public class PdePreprocessor {
// String farbe = Preferences.get("run.window.bgcolor");
// out.print("\"" + PApplet.ARGS_BGCOLOR + "=" + farbe + "\", ");
}
- out.println("\"" + className + "\" });");
+ out.println("\"" + className + "\" };");
+
+ out.println(indent + indent + "if (passedArgs != null) {");
+ out.println(indent + indent + " PApplet.main(concat(appletArgs, passedArgs));");
+ out.println(indent + indent + "} else {");
+ out.println(indent + indent + " PApplet.main(appletArgs);");
+ out.println(indent + indent + "}");
+
out.println(indent + "}");
}
diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java
index 0f7a552b1..71609151e 100644
--- a/core/src/processing/core/PApplet.java
+++ b/core/src/processing/core/PApplet.java
@@ -7483,6 +7483,7 @@ public class PApplet extends Applet
System.arraycopy(b, 0, c, a.length, b.length);
return c;
}
+
static public Object concat(Object a, Object b) {
Class> type = a.getClass().getComponentType();
int alength = Array.getLength(a);
@@ -9105,7 +9106,7 @@ public class PApplet extends Applet
* The simplest way to turn and applet into an application is to
* add the following code to your program:
* static public void main(String args[]) {
- * PApplet.main(new String[] { "YourSketchName" });
+ * PApplet.main("YourSketchName", args);
* }
* This will properly launch your applet from a double-clickable
* .jar or from the command line.
@@ -9146,7 +9147,33 @@ public class PApplet extends Applet
* editor window, for placement of applet window
*
*/
- public static void main(final String[] args) {
+ static public void main(final String[] args) {
+ runSketch(args, null);
+ }
+
+
+ /**
+ * Convenience method so that PApplet.main("YourSketch") launches a sketch,
+ * rather than having to wrap it into a String array.
+ * @param mainClass name of the class to load (with package if any)
+ */
+ static public void main(final String mainClass) {
+ main(mainClass, null);
+ }
+
+
+ /**
+ * Convenience method so that PApplet.main("YourSketch", args) launches a
+ * sketch, rather than having to wrap it into a String array, and appending
+ * the 'args' array when not null.
+ * @param mainClass name of the class to load (with package if any)
+ * @param args command line arguments to pass to the sketch
+ */
+ static public void main(final String mainClass, final String[] passedArgs) {
+ String[] args = new String[] { mainClass };
+ if (passedArgs != null) {
+ args = concat(args, passedArgs);
+ }
runSketch(args, null);
}
@@ -13959,7 +13986,7 @@ public class PApplet extends Applet
* PGraphicsJava2D, or resized image data and OpenGL texture indices for
* PGraphicsOpenGL.
* @param renderer The PGraphics renderer associated to the image
- * @param storage The metadata required by the renderer
+ * @param storage The metadata required by the renderer
*/
public void setCache(PGraphics renderer, Object storage) {
if (recorder != null) recorder.setCache(renderer, storage);
@@ -13994,7 +14021,7 @@ public class PApplet extends Applet
* Store parameters for a renderer that requires extra metadata of
* some kind.
* @param renderer The PGraphics renderer associated to the image
- * @param storage The parameters required by the renderer
+ * @param storage The parameters required by the renderer
*/
public void setParams(PGraphics renderer, Object params) {
if (recorder != null) recorder.setParams(renderer, params);
@@ -14024,26 +14051,26 @@ public class PApplet extends Applet
/**
* ( begin auto-generated from PImage_get.xml )
- *
- * Reads the color of any pixel or grabs a section of an image. If no
- * parameters are specified, the entire image is returned. Use the x
- * and y parameters to get the value of one pixel. Get a section of
- * the display window by specifying an additional width and
- * height parameter. When getting an image, the x and
- * y parameters define the coordinates for the upper-left corner of
+ *
+ * Reads the color of any pixel or grabs a section of an image. If no
+ * parameters are specified, the entire image is returned. Use the x
+ * and y parameters to get the value of one pixel. Get a section of
+ * the display window by specifying an additional width and
+ * height parameter. When getting an image, the x and
+ * y parameters define the coordinates for the upper-left corner of
* the image, regardless of the current imageMode().
*
- * If the pixel requested is outside of the image window, black is
- * returned. The numbers returned are scaled according to the current color
- * ranges, but only RGB values are returned by this function. For example,
- * even though you may have drawn a shape with colorMode(HSB), the
+ * If the pixel requested is outside of the image window, black is
+ * returned. The numbers returned are scaled according to the current color
+ * ranges, but only RGB values are returned by this function. For example,
+ * even though you may have drawn a shape with colorMode(HSB), the
* numbers returned will be in RGB format.
*
- * Getting the color of a single pixel with get(x, y) is easy, but
- * not as fast as grabbing the data directly from pixels[]. The
- * equivalent statement to get(x, y) using pixels[] is
+ * Getting the color of a single pixel with get(x, y) is easy, but
+ * not as fast as grabbing the data directly from pixels[]. The
+ * equivalent statement to get(x, y) using pixels[] is
* pixels[y*width+x]. See the reference for pixels[] for more information.
- *
+ *
* ( end auto-generated )
*
* Advanced
@@ -14063,7 +14090,7 @@ public class PApplet extends Applet
* is inside the bounds, and then has to check to see what image
* type it is. If you want things to be more efficient, access the
* pixels[] array directly.
- *
+ *
* @webref image:pixels
* @brief Reads the color of any pixel or grabs a rectangle of pixels
* @usage web_application
@@ -14097,25 +14124,25 @@ public class PApplet extends Applet
/**
* ( begin auto-generated from PImage_set.xml )
- *
- * Changes the color of any pixel or writes an image directly into the
+ *
+ * Changes the color of any pixel or writes an image directly into the
* display window.
*
- * The x and y parameters specify the pixel to change and the
- * color parameter specifies the color value. The color parameter is
- * affected by the current color mode (the default is RGB values from 0 to
- * 255). When setting an image, the x and y parameters define
- * the coordinates for the upper-left corner of the image, regardless of
+ * The x and y parameters specify the pixel to change and the
+ * color parameter specifies the color value. The color parameter is
+ * affected by the current color mode (the default is RGB values from 0 to
+ * 255). When setting an image, the x and y parameters define
+ * the coordinates for the upper-left corner of the image, regardless of
* the current imageMode().
*
- * Setting the color of a single pixel with set(x, y) is easy, but
- * not as fast as putting the data directly into pixels[]. The
- * equivalent statement to set(x, y, #000000) using pixels[]
- * is pixels[y*width+x] = #000000. See the reference for
+ * Setting the color of a single pixel with set(x, y) is easy, but
+ * not as fast as putting the data directly into pixels[]. The
+ * equivalent statement to set(x, y, #000000) using pixels[]
+ * is pixels[y*width+x] = #000000. See the reference for
* pixels[] for more information.
- *
+ *
* ( end auto-generated )
- *
+ *
* @webref image:pixels
* @brief writes a color to any pixel or writes an image into another
* @usage web_application
@@ -14148,18 +14175,18 @@ public class PApplet extends Applet
/**
* ( begin auto-generated from PImage_mask.xml )
- *
- * Masks part of an image from displaying by loading another image and
- * using it as an alpha channel. This mask image should only contain
- * grayscale data, but only the blue color channel is used. The mask image
+ *
+ * Masks part of an image from displaying by loading another image and
+ * using it as an alpha channel. This mask image should only contain
+ * grayscale data, but only the blue color channel is used. The mask image
* needs to be the same size as the image to which it is applied.
*
- * In addition to using a mask image, an integer array containing the alpha
- * channel data can be specified directly. This method is useful for
- * creating dynamically generated alpha masks. This array must be of the
- * same length as the target image's pixels array and should contain only
+ * In addition to using a mask image, an integer array containing the alpha
+ * channel data can be specified directly. This method is useful for
+ * creating dynamically generated alpha masks. This array must be of the
+ * same length as the target image's pixels array and should contain only
* grayscale data of values between 0-255.
- *
+ *
* ( end auto-generated )
*
* Advanced
@@ -14204,31 +14231,31 @@ public class PApplet extends Applet
/**
* ( begin auto-generated from PImage_filter.xml )
- *
- * Filters an image as defined by one of the following modes:
THRESHOLD - converts the image to black and white pixels depending if
- * they are above or below the threshold defined by the level parameter.
- * The level must be between 0.0 (black) and 1.0(white). If no level is
+ *
+ * Filters an image as defined by one of the following modes:
THRESHOLD - converts the image to black and white pixels depending if
+ * they are above or below the threshold defined by the level parameter.
+ * The level must be between 0.0 (black) and 1.0(white). If no level is
* specified, 0.5 is used.
*
* GRAY - converts any colors in the image to grayscale equivalents
*
* INVERT - sets each pixel to its inverse value
*
- * POSTERIZE - limits each channel of the image to the number of colors
+ * POSTERIZE - limits each channel of the image to the number of colors
* specified as the level parameter
*
- * BLUR - executes a Guassian blur with the level parameter specifying the
- * extent of the blurring. If no level parameter is used, the blur is
+ * BLUR - executes a Guassian blur with the level parameter specifying the
+ * extent of the blurring. If no level parameter is used, the blur is
* equivalent to Guassian blur of radius 1
*
* OPAQUE - sets the alpha channel to entirely opaque
*
- * ERODE - reduces the light areas with the amount defined by the level
+ * ERODE - reduces the light areas with the amount defined by the level
* parameter
*
* DILATE - increases the light areas with the amount defined by the level parameter
- *
+ *
* ( end auto-generated )
*
* Advanced
@@ -14263,17 +14290,17 @@ public class PApplet extends Applet
/**
* ( begin auto-generated from PImage_copy.xml )
- *
- * Copies a region of pixels from one image into another. If the source and
- * destination regions aren't the same size, it will automatically resize
- * source pixels to fit the specified target region. No alpha information
- * is used in the process, however if the source image has an alpha channel
+ *
+ * Copies a region of pixels from one image into another. If the source and
+ * destination regions aren't the same size, it will automatically resize
+ * source pixels to fit the specified target region. No alpha information
+ * is used in the process, however if the source image has an alpha channel
* set, it will be copied as well.
*
* As of release 0149, this function ignores imageMode().
- *
+ *
* ( end auto-generated )
- *
+ *
* @webref image:pixels
* @brief Copies the entire image
* @usage web_application
@@ -14308,11 +14335,11 @@ public class PApplet extends Applet
/**
* ( begin auto-generated from blendColor.xml )
- *
- * Blends two color values together based on the blending mode given as the
- * MODE parameter. The possible modes are described in the reference
+ *
+ * Blends two color values together based on the blending mode given as the
+ * MODE parameter. The possible modes are described in the reference
* for the blend() function.
- *
+ *
* ( end auto-generated )
* Advanced
*
@@ -14399,17 +14426,17 @@ public class PApplet extends Applet
/**
* ( begin auto-generated from PImage_blend.xml )
- *
- * Blends a region of pixels into the image specified by the img
- * parameter. These copies utilize full alpha channel support and a choice
- * of the following modes to blend the colors of source pixels (A) with the
+ *
+ * Blends a region of pixels into the image specified by the img
+ * parameter. These copies utilize full alpha channel support and a choice
+ * of the following modes to blend the colors of source pixels (A) with the
* ones of pixels in the destination image (B):
*
* BLEND - linear interpolation of colours: C = A*factor + B
*
* ADD - additive blending with white clip: C = min(A*factor + B, 255)
*
- * SUBTRACT - subtractive blending with black clip: C = max(B - A*factor,
+ * SUBTRACT - subtractive blending with black clip: C = max(B - A*factor,
* 0)
*
* DARKEST - only the darkest colour succeeds: C = min(A*factor, B)
@@ -14429,7 +14456,7 @@ public class PApplet extends Applet
*
* HARD_LIGHT - SCREEN when greater than 50% gray, MULTIPLY when lower.
*
- * SOFT_LIGHT - Mix of DARKEST and LIGHTEST.
+ * SOFT_LIGHT - Mix of DARKEST and LIGHTEST.
* Works like OVERLAY, but not as harsh.
*
* DODGE - Lightens light tones and increases contrast, ignores darks.
@@ -14438,14 +14465,14 @@ public class PApplet extends Applet
* BURN - Darker areas are applied, increasing contrast, ignores lights.
* Called "Color Burn" in Illustrator and Photoshop.
*
- * All modes use the alpha information (highest byte) of source image
- * pixels as the blending factor. If the source and destination regions are
- * different sizes, the image will be automatically resized to match the
- * destination size. If the srcImg parameter is not used, the
+ * All modes use the alpha information (highest byte) of source image
+ * pixels as the blending factor. If the source and destination regions are
+ * different sizes, the image will be automatically resized to match the
+ * destination size. If the srcImg parameter is not used, the
* display window is used as the source image.
*
* As of release 0149, this function ignores imageMode().
- *
+ *
* ( end auto-generated )
*
* @webref image:pixels
diff --git a/core/todo.txt b/core/todo.txt
index 321545f5e..9bda214c4 100644
--- a/core/todo.txt
+++ b/core/todo.txt
@@ -21,21 +21,43 @@ X Set default path for selectXxxxx() functions
X http://code.google.com/p/processing/issues/detail?id=233
X XML now throws exceptions in its constructor, use loadXML() instead
X http://code.google.com/p/processing/issues/detail?id=1138
-
-3D and OpenGL
+X loadXML() should return null, new XML() should throw exceptions
+X http://code.google.com/p/processing/issues/detail?id=1138
A ortho() causing line and fill to be misaligned
A http://code.google.com/p/processing/issues/detail?id=1143
+o smooth() not working with applets an createGraphics(JAVA2D)
+o but works fine with applications
+o need an example of this
+o this might be a problem of the offscreen surface as RGB not RGBA
+o but that's been changed in more recent releases
+o size() inside draw is missing a new call to cameraMode, etc
+o fix param() to use a sketch.properties file when run as an app
+o make this also be used in generating the html file
+o test winding polygons in different directions
+X PApplet.main(new String[] { "classname" }) won't pass in args
+X this means that no args are after passed to the class
+X the fix would be to use the following as the call to main()
+X PApplet.main(append(new String[] { "classname }, args));
+X added PApplet.main(String name, String[] args)
+before beta
+_ loadShape() mess
+_ get things out of PGraphics
+_ separate PShape2/3D from OpenGL
+_ incorporate SVG loader into the 2D class
+_ finish PGL/GL naming and cleanups to API
+_ loadPixels() implementation
+
+_ incorporate patch for SVG Gradients from Inkscape
+_ http://code.google.com/p/processing/issues/detail?id=1142
constants/hints
_ bring PConstants back in line w/ previous 1.5 (can't renumber)
_ consider enable("mipmaps") instead of hint(ENABLE_MIPMAPS)
_ hint(DISABLE_LOADPIXELS) -> faster rendering in Java2D
+_ clean up PConstants and move things into PGraphics that needn't be available
-_ loadXML() should return null, new XML() should throw exceptions
-_ http://code.google.com/p/processing/issues/detail?id=1138
-
-docs (2.0a6)
+docs (2.0)
_ online is there but deprecated
_ doesn't test net connection to see if 'online'
_ only tests whether running inside an applet viewer
@@ -48,8 +70,13 @@ _ antialias -> smoothMode(), smoothQuality(), quality()
_ NEAREST, BILINEAR, BICUBIC, or 0, 2, 4? (need 8x too, so maybe numbers)
_ final decision on pg.setQuality(sketchQuality())
_ should probably be setQuality(parent.sketchQuality())
-
-_ clean up PConstants and move things into PGraphics that needn't be available
+_ add reference/docs for urlEncode() and urlDecode()
+_ verify (and document) public access members of PApplet
+_ http://dev.processing.org/bugs/show_bug.cgi?id=660
+_ some docs missing (therefore not syntax highlighting)
+_ http://dev.processing.org/bugs/show_bug.cgi?id=661
+_ constants that are not highlighting (WINDOWS the only one?)
+_ http://dev.processing.org/bugs/show_bug.cgi?id=662
_ move requestFocusInWindow() to safter EDT place
_ look into using BufferStrategy again to improve performance
@@ -69,6 +96,10 @@ _ Update JOGL when RC6 arrive: forum.jogamp.org/Road-to-RC6-td3866404.html
_ PUtil -> move match(), lots of other non-gui functions into own class
_ and merge it in statically via the methods code
+_ check for what else inside PApplet should be static
+_ maybe catch RuntimeExceptions in the called sub-functions
+_ that way more stuff can be static w/o losing useful error handling
+_ (emitting errors when closest to source.. i.e. w/ the filename)
_ memory leak when many createGraphics(..., JAVA2D) calls are used
_ http://code.google.com/p/processing/issues/detail?id=507
@@ -80,29 +111,15 @@ o or background(r, g, b, a) would be the thing
_ clear() with a color doesn't make (verbal) sense
_ provide a way to clear the PGraphics with plain alpha
-_ in PApplet.main(), windowClosing() should probably be calling 'exit()'
-_ or rather, we should never call System.exit(0), ja?
-_ dispose() method in PApplet should be empty so ppl can override
-_ move that stuff to destroy()
-_ pause()/resume() need to work on the desktop side as well
-_ notify ddf when pause/resume implemented
-_ stop() not called in 1.5
-_ http://code.google.com/p/processing/issues/detail?id=636
-_ In reply to c#1, I noticed that dispose() is getting called. stop() isn't.
-_ static mode sketches seem to break ESC... noLoop() problem?
-_ need to find another way to get ESC on static mode
-_ b/c static mode sketches *do* finish because they have no draw()
-
-_ fix edge + 1 issue on stroke/fill for rectangles
+_ sort out edge + 1 issue on stroke/fill for rectangles
_ http://code.google.com/p/processing/issues/detail?id=509
-_ add reference/docs for urlEncode() and urlDecode()
-
_ add() to add things to lists, sum() for the math (sum is used less after all)
_ add inputPath() and outputPath() -> sketch folder or sd card
_ or should this just be a change to sketchPath() on Android?
_ also because input/output won't be different (since not data folder)
+_ or should this be storagePath() etc?
_ finish adding loadStrings(BufferedReader)
_ decide if we want to keep this (and/or others?)
@@ -230,13 +247,15 @@ X decision: useExtension() or something like that
_ how should stroke work w/ arcs?
_ has an effect elliptical arc
_ http://code.google.com/p/processing/issues/detail?id=130
-o decision: we should do pie, you can make the other kind w/o it
+X decision: we should do pie, you can make the other kind w/o it
_ add an additional parameter for the others
_ http://code.google.com/p/processing/issues/detail?id=711
_ require people to put things in the data folder
_ make sure that loadXxxx() methods are used after init()
_ nasty errors when loadImage/Font/createFont/etc used outside
_ decision: add error messages where possible
+_ idea: set frameCount to -1 when setup not run yet?
+_ then set frameCount to 0 when setup() starts?
_ PShape API to handle internal vertex stuff
_ add deconstruct() method for paths
_ toArray() and toVector()
@@ -299,12 +318,6 @@ _ http://code.google.com/p/processing/issues/detail?id=246
_ add breakShape to the public API
_ or handle differently in general.. nested beginPath() calls?
-_ smooth() not working with applets an createGraphics(JAVA2D)
-_ but works fine with applications
-_ need an example of this
-_ this might be a problem of the offscreen surface as RGB not RGBA
-_ but that's been changed in more recent releases
-
looping/events
_ key and mouse events delivered out of order
_ http://code.google.com/p/processing/issues/detail?id=79
@@ -315,6 +328,18 @@ _ redraw() doesn't work from within draw()
_ http://code.google.com/p/processing/issues/detail?id=195
stop() mess
+_ in PApplet.main(), windowClosing() should probably be calling 'exit()'
+_ or rather, we should never call System.exit(0), ja?
+_ dispose() method in PApplet should be empty so ppl can override
+_ move that stuff to destroy()
+_ pause()/resume() need to work on the desktop side as well
+_ notify ddf when pause/resume implemented
+_ stop() not called in 1.5
+_ http://code.google.com/p/processing/issues/detail?id=636
+_ In reply to c#1, I noticed that dispose() is getting called. stop() isn't.
+_ static mode sketches seem to break ESC... noLoop() problem?
+_ need to find another way to get ESC on static mode
+_ b/c static mode sketches *do* finish because they have no draw()
_ sort out destroy(), stop(), pause() et al
_ ColorSelector should stop/pause when not visible
_ right now it's doing a low-level looping
@@ -352,34 +377,6 @@ _ noloop ref even says that redraw will be called on resize, make sure it is
_ focus not coming through, ESC no longer working(?)
_ stop() not called in 1.5 when closing the sketch window
_ http://code.google.com/p/processing/issues/detail?id=636
-
-
-
-////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////
-
-
-CORE / PApplet
-
-_ PApplet.main(new String[] { "classname" }) won't pass in args
-_ this means that no args are after passed to the class
-_ the fix would be to use the following as the call to main()
-_ PApplet.main(append(new String[] { "classname }, args));
-_ check for what else inside PApplet should be static
-_ maybe catch RuntimeExceptions in the called sub-functions
-_ that way more stuff can be static w/o losing useful error handling
-_ (emitting errors when closest to source.. i.e. w/ the filename)
-o size() inside draw is missing a new call to cameraMode, etc
-_ fix param() to use a sketch.properties file when run as an app
-_ make this also be used in generating the html file
-_ test winding polygons in different directions
-_ loadBytes() needs optimization
-_ don't bother using a buffering stream, just handle internally. gah!
-
-
-CORE / PApplet - main()
-
_ hitting cmd-q when an applet is running quits p5 (on macosx)
_ but cmd-q when running externally is ok because it just quits
_ is there a way to catch cmd-q when running a sketch?
@@ -388,6 +385,12 @@ _ or if the sketch window is foremost
_ maybe a hack where a new menubar is added?
+
+////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////
+
+
CORE / PFont and text()
_ what's the difference with ascent on loadFont vs. createFont?
@@ -612,6 +615,8 @@ LATER / Optimize
_ put a wrapper around InputStream returned by createInput
_ that actually has some notion of the length of its input
_ that way, methods could use the information when reading
+_ loadBytes() needs optimization
+_ don't bother using a buffering stream, just handle internally. gah!
_ can loadBytes() be improved by querying file size first?
_ background
_ this would require a new version of createInput(), which would query
diff --git a/todo.txt b/todo.txt
index c5b655b68..9fd408edf 100644
--- a/todo.txt
+++ b/todo.txt
@@ -34,6 +34,34 @@ X http://code.google.com/p/processing/issues/detail?id=884
X suppress XInitThreads message on Linux with JOGL
X Linux file chooser is gross (presumably Windows too)
X http://code.google.com/p/processing/issues/detail?id=1014
+X make note that Android tools do not run on 64-bit Linux
+X causes "file not found" errors
+X switch to a non-modified version of launch4j
+X figured out how to do Intel build for OS X
+
+cleaning/earlier
+o PApplet.this doesn't work
+o doesn't work in javac either--needs to be ClassName.this
+o sketchname.this also doesn't work, because Temporary_NNNN used for name
+o but since it's another tab/class, will run externally
+o so should make the external version use the actual sketch name not temp
+o can't use PApplet.this, doesn't seem to like that
+o instead, must pass variable to inner class
+X should be working (for a while) now because no longer using a temp name
+
+applets
+o tool to run in appletviewer? sun.applet.Main is appletviewer
+X require Java 6 (and with that, OS X 10.5 plus Core 2 Intel Mac)?
+o though we need a 64-bit browser before applets will run...
+o http://www.ornl.gov/~t6p/Main/Utilities.html
+o courseware
+o export sketch as applet when uploading
+o save sketch zip files
+o have a means to load them from "teacher" version of p5
+o figure out how to use the
+o items from the 'code' folder not included with applet export
+
+http://wiki.processing.org/w/Android
_ Linux sketchbook selector wasn't working properly at all
@@ -95,6 +123,9 @@ _ http://code.google.com/p/processing/issues/detail?id=515
C Casey says yes kill ext editor and finish command line
_ use as a way to remove the non-GUI-specifc code from PApplet
_ so that the builds can run headless
+_ processing.app.Commander headless still requiring X11
+_ problem is static calls to PApplet
+_ http://dev.processing.org/bugs/show_bug.cgi?id=1426
X could move to java6 and better internal javac support (drop ecj)
_ decided to use Java 6, so check on Javac usefulness
_ change command line to just be part of regular (separate) distros
@@ -108,10 +139,6 @@ _ need to deal with setting path to sketchbook/examples
_ also deal with the script not being in the right folder
_ problems with imports and prefs file
_ http://dev.processing.org/bugs/show_bug.cgi?id=1298
-_ processing.app.Commander headless still requiring X11
-_ problem is static calls to PApplet
-_ http://dev.processing.org/bugs/show_bug.cgi?id=1426
-
_ wordtreemap_sotu gives weird preproc error: wrong line, can't parse extends
@@ -152,9 +179,7 @@ _ problem with startup on vista 64
_ try this with windows 7 64-bit (install on laptop?)
_ http://dev.processing.org/bugs/show_bug.cgi?id=1246
-_ switch to a non-modified version of launch4j
_ switch the exported launcher to use launch4j as well?
-X figured out how to do Intel build for OS X
_ how to catch these?
Exception in thread "Animation Thread" java.lang.NoClassDefFoundError: Could not initialize class javax.media.opengl.GLProfile
@@ -168,7 +193,6 @@ _ nurbs or other architecture stuff
_ force indentation - implement an option for beginners especially
_ indents and loops
_ or make the area light up gray as it's being worked on
-_ fix autoformat to indent like the p5 book/examples
_ common error messages
_ with a proper list, we can add links when throwing an error in the PDE
@@ -482,11 +506,6 @@ _ along with php script to handle receive
_ this is in hacks, but
_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=VideoCamera;action=display;num=1117194066#7
_ ftp upload sketch
-_ courseware
-_ export sketch as applet when uploading
-_ save sketch zip files
-_ have a means to load them from "teacher" version of p5
-_ figure out how to use the
version 2.0
_ add proper copyright and license information for all included projects
@@ -500,7 +519,6 @@ _ check if libraries folder does not exist
_ check to see if other libraries are installed
_ warn user about moving libraries and restarting
-_ items from the 'code' folder not included with applet export
_ deleting open sketch (with only one window) attempts to quit
_ (and still deletes, but doesn't close, even if quitting is canceled)
@@ -740,25 +758,12 @@ _ problem with big floats:
_ http://processing.org/discourse/yabb/YaBB.cgi?board=Syntax;action=display;num=1061302380
_ problem with small floats:
_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Programs;action=display;num=1115500448
-_ verify (and document) public access members of PApplet
-_ http://dev.processing.org/bugs/show_bug.cgi?id=660
-_ some docs missing (therefore not syntax highlighting)
-_ http://dev.processing.org/bugs/show_bug.cgi?id=661
-_ constants that are not highlighting (WINDOWS the only one?)
-_ http://dev.processing.org/bugs/show_bug.cgi?id=662
_ consoleXxxx and untitledXxxx folders in /tmp
_ console may be useful for debugging
_ untitled folders are stored in temp folder
_ switching into present mode in info.plist
LSUIPresentationMode
4
-_ PApplet.this doesn't work
-_ doesn't work in javac either--needs to be ClassName.this
-_ sketchname.this also doesn't work, because Temporary_NNNN used for name
-_ but since it's another tab/class, will run externally
-_ so should make the external version use the actual sketch name not temp
-_ can't use PApplet.this, doesn't seem to like that
-_ instead, must pass variable to inner class
_ errors with serial and libraries
Exception in thread "Thread-2" java.lang.NoClassDefFoundError:
processing/core/PApplet
@@ -1305,7 +1310,6 @@ _ that copies applet.html,
_ opens sketch folder,
_ and gives info about what to do next (how to edit)
_ http://dev.processing.org/bugs/show_bug.cgi?id=143
-_ tool to run in appletviewer? sun.applet.Main is appletviewer
_ import sketch from url (takes a zip from archive sketch)
_ archive sketch direct to bug report
_ shared code
@@ -1316,11 +1320,11 @@ _ update will update classes from shared in the current folder
TOOLS / Create Font
-E3 _ "create font" is slow, implement a progress indicator
-E3 _ http://dev.processing.org/bugs/show_bug.cgi?id=1464
+_ "create font" is slow, implement a progress indicator
+_ http://dev.processing.org/bugs/show_bug.cgi?id=1464
-TOOLS / Color Picker
+TOOLS / Color Selector
_ pasting into color picker doesn't update the color values
_ http://dev.processing.org/bugs/show_bug.cgi?id=503
@@ -1328,9 +1332,14 @@ _ http://dev.processing.org/bugs/show_bug.cgi?id=503
TOOLS / Auto Format
-_ do a better job of maintaining cursor during beautify
-_ jdf says: a specification would help here!
-_ only auto format a particular section of code
+_ fix autoformat to indent like the p5 book/examples
+_ http://code.google.com/p/processing/issues/detail?id=325
+_ extra indent found
+_ http://code.google.com/p/processing/issues/detail?id=1003
+_ Switch block cases not indented
+_ http://code.google.com/p/processing/issues/detail?id=1004
+_ do a better job of maintaining cursor
+_ only auto-format a particular section of code
_ set the 'tabs' var based on how many spaces on previous line
_ http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_Software;action=display;num=1087227217
@@ -1548,9 +1557,6 @@ _ better text editor / live debugging (integrate Eclipse JDT)
_ line numbers
_ it's too difficult for students to debug their code
_ can the jdt be hooked in somewhat easily?
-_ require Java 6 (and with that, OS X 10.5 plus Core 2 Intel Mac)?
-_ though we need a 64-bit browser before applets will run...
-_ http://www.ornl.gov/~t6p/Main/Utilities.html
_ get rid of static mode? only setup/draw mode? or create project that way?
_ pro: simplify internal code, fixes some of the worst errors
_ con: people love it, most of the books use it heavily