diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 6f018aaa8..4bff2cdb0 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -1051,7 +1051,7 @@ public class Base { "but you don't have " + preferredMode.title + " installed.\n" + "Would you like to try a different mode for opening a " + "." + extension + " sketch?"); - return (Mode) JOptionPane.showInputDialog(null, message, "Modal Dialog", + return (Mode) JOptionPane.showInputDialog(null, message, "Choose Wisely", JOptionPane.QUESTION_MESSAGE, null, modes, modes[0]); } diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java index 5c6067b3f..8cfb77773 100644 --- a/app/src/processing/app/Editor.java +++ b/app/src/processing/app/Editor.java @@ -1492,7 +1492,7 @@ public abstract class Editor extends JFrame implements RunnerListener { public int getScrollPosition() { - return textarea.getScrollPosition(); + return textarea.getVerticalScrollPosition(); } @@ -1761,7 +1761,7 @@ public abstract class Editor extends JFrame implements RunnerListener { } else { // replace with new bootiful text // selectionEnd hopefully at least in the neighborhood - int scrollPos = textarea.getScrollPosition(); + int scrollPos = textarea.getVerticalScrollPosition(); setText(formattedText); setSelection(selectionEnd, selectionEnd); @@ -1769,14 +1769,14 @@ public abstract class Editor extends JFrame implements RunnerListener { // Since we're not doing a good job of maintaining position anyway, // a more complicated workaround here is fairly pointless. // http://code.google.com/p/processing/issues/detail?id=1533 - if (scrollPos != textarea.getScrollPosition()) { + if (scrollPos != textarea.getVerticalScrollPosition()) { // boolean wouldBeVisible = // scrollPos >= textarea.getFirstLine() && // scrollPos < textarea.getLastLine(); // // // if it was visible, and now it's not, then allow the scroll // if (!(wasVisible && !wouldBeVisible)) { - textarea.setScrollPosition(scrollPos); + textarea.setVerticalScrollPosition(scrollPos); // } } getSketch().setModified(true); diff --git a/app/src/processing/app/Recent.java b/app/src/processing/app/Recent.java index 4af3a566c..8dc1069b1 100644 --- a/app/src/processing/app/Recent.java +++ b/app/src/processing/app/Recent.java @@ -118,7 +118,14 @@ public class Recent { menu.removeAll(); String sketchbookPath = Base.getSketchbookFolder().getAbsolutePath(); // String homePath = System.getProperty("user.home"); - for (final Record rec : records) { + for (Record rec : records) { + updateMenuRecord(menu, rec, sketchbookPath); + } + } + + + private void updateMenuRecord(JMenu menu, final Record rec, String sketchbookPath) { + try { String recPath = new File(rec.getPath()).getParent(); String purtyPath = null; @@ -197,6 +204,11 @@ public class Recent { }); //menu.add(item); menu.insert(item, 0); + + } catch (Exception e) { + // Strange things can happen... report them for the geeky and move on: + // https://github.com/processing/processing/issues/2463 + e.printStackTrace(); } } diff --git a/app/src/processing/app/contrib/ModeContribution.java b/app/src/processing/app/contrib/ModeContribution.java index 27e363484..052628e7b 100644 --- a/app/src/processing/app/contrib/ModeContribution.java +++ b/app/src/processing/app/contrib/ModeContribution.java @@ -114,7 +114,7 @@ public class ModeContribution extends LocalContribution { // -Dusemode=com.foo.FrobMode:/path/to/FrobMode/resources final String usemode = System.getProperty("usemode"); if (usemode != null) { - final String[] modeinfo = usemode.split(":"); + final String[] modeinfo = usemode.split(":", 2); final String modeClass = modeinfo[0]; final String modeResourcePath = modeinfo[1]; System.err.println("Attempting to load " + modeClass + " with resources at " + modeResourcePath); diff --git a/app/src/processing/app/syntax/JEditTextArea.java b/app/src/processing/app/syntax/JEditTextArea.java index 60bfad38a..de7eb16ce 100644 --- a/app/src/processing/app/syntax/JEditTextArea.java +++ b/app/src/processing/app/syntax/JEditTextArea.java @@ -192,20 +192,54 @@ public class JEditTextArea extends JComponent /** * Get current position of the vertical scroll bar. [fry] + * @deprecated Use {@link #getVerticalScrollPosition()}. */ public int getScrollPosition() { - return vertical.getValue(); + return getVerticalScrollPosition(); } /** * Set position of the vertical scroll bar. [fry] + * @deprecated Use {@link #setVerticalScrollPosition(int)}. */ public void setScrollPosition(int what) { - vertical.setValue(what); + setVerticalScrollPosition(what); + } + + + /** + * Get current position of the vertical scroll bar. + */ + public int getVerticalScrollPosition() { + return vertical.getValue(); } + /** + * Set position of the vertical scroll bar. + */ + public void setVerticalScrollPosition(int what) { + vertical.setValue(what); + } + + + /** + * Get current position of the horizontal scroll bar. + */ + public int getHorizontalScrollPosition() { + return horizontal.getValue(); + } + + + /** + * Set position of the horizontal scroll bar. + */ + public void setHorizontalScrollPosition(int what) { + horizontal.setValue(what); + } + + /** * Returns the object responsible for painting this text area. */ @@ -776,8 +810,8 @@ public class JEditTextArea extends JComponent * Set document with a twist, includes the old caret * and scroll positions, added for p5. [fry] */ - public void setDocument(SyntaxDocument document, - int start, int stop, int scroll) { + public void setDocument(SyntaxDocument document, + int start, int stop, int scroll) { if (this.document == document) return; if (this.document != null) @@ -788,7 +822,7 @@ public class JEditTextArea extends JComponent select(start, stop); updateScrollBars(); - setScrollPosition(scroll); + setVerticalScrollPosition(scroll); painter.repaint(); } @@ -797,65 +831,60 @@ public class JEditTextArea extends JComponent * Returns the document's token marker. Equivalent to calling * getDocument().getTokenMarker(). */ - public final TokenMarker getTokenMarker() - { + public final TokenMarker getTokenMarker() { return document.getTokenMarker(); } + /** * Sets the document's token marker. Equivalent to caling * getDocument().setTokenMarker(). * @param tokenMarker The token marker */ - public final void setTokenMarker(TokenMarker tokenMarker) - { + public final void setTokenMarker(TokenMarker tokenMarker) { document.setTokenMarker(tokenMarker); } + /** * Returns the length of the document. Equivalent to calling * getDocument().getLength(). */ - public final int getDocumentLength() - { + public final int getDocumentLength() { return document.getLength(); } + /** * Returns the number of lines in the document. */ - public final int getLineCount() - { + public final int getLineCount() { return document.getDefaultRootElement().getElementCount(); } + /** * Returns the line containing the specified offset. * @param offset The offset */ - public final int getLineOfOffset(int offset) - { + public final int getLineOfOffset(int offset) { return document.getDefaultRootElement().getElementIndex(offset); } + /** * Returns the start offset of the specified line. * @param line The line * @return The start offset of the specified line, or -1 if the line is * invalid */ - public int getLineStartOffset(int line) - { - Element lineElement = document.getDefaultRootElement() - .getElement(line); - if(lineElement == null) - return -1; - else - return lineElement.getStartOffset(); + public int getLineStartOffset(int line) { + Element lineElement = document.getDefaultRootElement().getElement(line); + return (lineElement == null) ? -1 : lineElement.getStartOffset(); } - public int getLineStartNonWhiteSpaceOffset(int line) - { + + public int getLineStartNonWhiteSpaceOffset(int line) { int offset = getLineStartOffset(line); int length = getLineLength(line); String str = getText(offset, length); @@ -868,37 +897,33 @@ public class JEditTextArea extends JComponent return offset + length; } + /** * Returns the end offset of the specified line. * @param line The line * @return The end offset of the specified line, or -1 if the line is * invalid. */ - public int getLineStopOffset(int line) - { - Element lineElement = document.getDefaultRootElement() - .getElement(line); - if(lineElement == null) - return -1; - else - return lineElement.getEndOffset(); + public int getLineStopOffset(int line) { + Element lineElement = document.getDefaultRootElement().getElement(line); + return (lineElement == null) ? -1 : lineElement.getEndOffset(); } - public int getLineStopNonWhiteSpaceOffset(int line) - { + + public int getLineStopNonWhiteSpaceOffset(int line) { int offset = getLineStopOffset(line); int length = getLineLength(line); String str = getText(offset - length - 1, length); - for(int i = 0; i < length; i++) { + for (int i = 0; i < length; i++) { if(!Character.isWhitespace(str.charAt(length - i - 1))) { return offset - i; } } - return offset - length; } + /** * Returns the start offset of the line after this line, or the end of * this line if there is no next line. @@ -906,42 +931,32 @@ public class JEditTextArea extends JComponent * @return The end offset of the specified line, or -1 if the line is * invalid. */ - public int getLineSelectionStopOffset(int line) - { - Element lineElement = document.getDefaultRootElement() - .getElement(line); - if(lineElement == null) - return -1; - else - return Math.min(lineElement.getEndOffset(),getDocumentLength()); + public int getLineSelectionStopOffset(int line) { + Element lineElement = document.getDefaultRootElement().getElement(line); + return (lineElement == null) ? -1 : + Math.min(lineElement.getEndOffset(), getDocumentLength()); } + /** * Returns the length of the specified line. * @param line The line */ - public int getLineLength(int line) - { - Element lineElement = document.getDefaultRootElement() - .getElement(line); - if(lineElement == null) - return -1; - else - return lineElement.getEndOffset() - - lineElement.getStartOffset() - 1; + public int getLineLength(int line) { + Element lineElement = document.getDefaultRootElement().getElement(line); + return (lineElement == null) ? -1 : + lineElement.getEndOffset() - lineElement.getStartOffset() - 1; } + /** * Returns the entire text of this text area. */ - public String getText() - { - try - { + public String getText() { + try { return document.getText(0,document.getLength()); - } - catch(BadLocationException bl) - { + + } catch(BadLocationException bl) { bl.printStackTrace(); return null; } @@ -951,8 +966,7 @@ public class JEditTextArea extends JComponent /** * Sets the entire text of this text area. */ - public void setText(String text) - { + public void setText(String text) { try { document.beginCompoundEdit(); document.remove(0,document.getLength()); @@ -973,18 +987,16 @@ public class JEditTextArea extends JComponent * @param len The length of the substring * @return The substring, or null if the offsets are invalid */ - public final String getText(int start, int len) - { - try - { + public final String getText(int start, int len) { + try { return document.getText(start,len); - } - catch(BadLocationException bl) - { + + } catch(BadLocationException bl) { bl.printStackTrace(); return null; } } + /** * Copies the specified substring of the document into a segment. @@ -993,49 +1005,47 @@ public class JEditTextArea extends JComponent * @param len The length of the substring * @param segment The segment */ - public final void getText(int start, int len, Segment segment) - { - try - { + public final void getText(int start, int len, Segment segment) { + try { document.getText(start,len,segment); - } - catch(BadLocationException bl) - { + + } catch(BadLocationException bl) { bl.printStackTrace(); segment.offset = segment.count = 0; } } + /** * Returns the text on the specified line. * @param lineIndex The line * @return The text, or null if the line is invalid */ - public final String getLineText(int lineIndex) - { + public final String getLineText(int lineIndex) { int start = getLineStartOffset(lineIndex); return getText(start,getLineStopOffset(lineIndex) - start - 1); } + /** * Copies the text on the specified line into a segment. If the line * is invalid, the segment will contain a null string. * @param lineIndex The line */ - public final void getLineText(int lineIndex, Segment segment) - { + public final void getLineText(int lineIndex, Segment segment) { int start = getLineStartOffset(lineIndex); getText(start,getLineStopOffset(lineIndex) - start - 1,segment); } + /** * Returns the selection start offset. */ - public final int getSelectionStart() - { + public final int getSelectionStart() { return selectionStart; } + /** * Returns the offset where the selection starts on the specified * line. diff --git a/app/src/processing/mode/java/JavaBuild.java b/app/src/processing/mode/java/JavaBuild.java index 1f7462ba5..5bb3bcf4f 100644 --- a/app/src/processing/mode/java/JavaBuild.java +++ b/app/src/processing/mode/java/JavaBuild.java @@ -1278,7 +1278,8 @@ public class JavaBuild { File batFile = new File(destFolder, sketch.getName() + ".bat"); PrintWriter writer = PApplet.createWriter(batFile); writer.println("@echo off"); - writer.println("java -Djava.ext.dirs=lib -Djava.library.path=lib " + sketch.getName()); + String javaPath = embedJava ? ".\\java\\bin\\java.exe" : "java"; + writer.println(javaPath + " -Djava.ext.dirs=lib -Djava.library.path=lib " + sketch.getName()); writer.flush(); writer.close(); } else { @@ -1558,6 +1559,10 @@ public class JavaBuild { pw.print("APPDIR=$(dirname \"$0\")\n"); // more posix compliant // another fix for bug #234, LD_LIBRARY_PATH ignored on some platforms //ps.print("LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$APPDIR\n"); + if (embedJava) { + // https://github.com/processing/processing/issues/2349 + pw.print("$APPDIR/java/bin/"); + } pw.print("java " + Preferences.get("run.options") + " -Djava.library.path=\"$APPDIR:$APPDIR/lib\"" + " -cp \"" + exportClassPath + "\"" + diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 5a1e47ee9..e9d694b92 100755 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -950,12 +950,13 @@ public class PApplet extends Applet online = false; } - // overridden in runSketch(), removing for 2.1.2 -// try { -// if (sketchPath == null) { -// sketchPath = System.getProperty("user.dir"); -// } -// } catch (Exception e) { } // may be a security problem + // Removed in 2.1.2, brought back for 2.1.3. Usually sketchPath is set + // inside runSketch(), but if this sketch takes care of calls to init() + // and setup() itself (i.e. it's in a larger Java application), it'll + // still need to be set here so that fonts, etc can be retrieved. + if (sketchPath == null) { + sketchPath = calcSketchPath(); + } // Figure out the available display width and height. // No major problem if this fails, we have to try again anyway in @@ -1634,6 +1635,7 @@ public class PApplet extends Applet * @see PApplet#noLoop() * @see PApplet#redraw() * @see PApplet#frameRate(float) + * @see PGraphics#background(float, float, float, float) */ public void draw() { // if no draw method, then shut things down @@ -4269,6 +4271,7 @@ public class PApplet extends Applet * @webref output:image * @see PApplet#save(String) * @see PApplet#createGraphics(int, int, String, String) + * @see PApplet#frameCount * @param filename any sequence of letters or numbers that ends with either ".tif", ".tga", ".jpg", or ".png" */ public void saveFrame(String filename) { @@ -10590,36 +10593,7 @@ public class PApplet extends Applet boolean hideStop = false; String param = null, value = null; - - // try to get the user folder. if running under java web start, - // this may cause a security exception if the code is not signed. - // http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Integrate;action=display;num=1159386274 - String folder = null; - try { - folder = System.getProperty("user.dir"); -// println("user dir is " + folder); - - // Workaround for bug in Java for OS X from Oracle (7u51) - // https://github.com/processing/processing/issues/2181 - if (platform == MACOSX) { - String jarPath = - PApplet.class.getProtectionDomain().getCodeSource().getLocation().getPath(); -// println("jar path: " + jarPath); - // The jarPath from above will be URL encoded (%20 for spaces) - jarPath = urlDecode(jarPath); -// println("decoded jar path: " + jarPath); - if (jarPath.contains("Contents/Java/")) { - String appPath = jarPath.substring(0, jarPath.indexOf(".app") + 4); - File containingFolder = new File(appPath).getParentFile(); - folder = containingFolder.getAbsolutePath(); -// println("folder is " + folder); - } -// } else { -// println("platform is " + platform); - } - } catch (Exception e) { - e.printStackTrace(); - } + String folder = calcSketchPath(); int argIndex = 0; while (argIndex < args.length) { @@ -11064,6 +11038,34 @@ public class PApplet extends Applet } + static protected String calcSketchPath() { + // try to get the user folder. if running under java web start, + // this may cause a security exception if the code is not signed. + // http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Integrate;action=display;num=1159386274 + String folder = null; + try { + folder = System.getProperty("user.dir"); + + // Workaround for bug in Java for OS X from Oracle (7u51) + // https://github.com/processing/processing/issues/2181 + if (platform == MACOSX) { + String jarPath = + PApplet.class.getProtectionDomain().getCodeSource().getLocation().getPath(); + // The jarPath from above will be URL encoded (%20 for spaces) + jarPath = urlDecode(jarPath); + if (jarPath.contains("Contents/Java/")) { + String appPath = jarPath.substring(0, jarPath.indexOf(".app") + 4); + File containingFolder = new File(appPath).getParentFile(); + folder = containingFolder.getAbsolutePath(); + } + } + } catch (Exception e) { + e.printStackTrace(); + } + return folder; + } + + ////////////////////////////////////////////////////////////// diff --git a/core/src/processing/core/PGraphicsRetina2D.java b/core/src/processing/core/PGraphicsRetina2D.java index 44c058942..786e3ba6f 100644 --- a/core/src/processing/core/PGraphicsRetina2D.java +++ b/core/src/processing/core/PGraphicsRetina2D.java @@ -87,11 +87,19 @@ public class PGraphicsRetina2D extends PGraphicsJava2D { // FRAME + + @Override + public boolean canDraw() { + return parent.getGraphicsConfiguration() != null; + } + + @Override public void beginDraw() { // g2 = (Graphics2D) parent.getGraphics(); GraphicsConfiguration gc = parent.getGraphicsConfiguration(); + // if (false) { // if (image == null || ((VolatileImage) image).validate(gc) == VolatileImage.IMAGE_INCOMPATIBLE) { // image = gc.createCompatibleVolatileImage(width*2, height*2); diff --git a/core/src/processing/core/PVector.java b/core/src/processing/core/PVector.java index 58f86da3d..49e54a0d0 100644 --- a/core/src/processing/core/PVector.java +++ b/core/src/processing/core/PVector.java @@ -161,7 +161,7 @@ public class PVector implements Serializable { * @param x the x component of the vector * @param y the y component of the vector * @param z the z component of the vector - * @brief Set the x, y, and z component of the vector + * @brief Set the components of the vector */ public void set(float x, float y, float z) { this.x = x; @@ -170,11 +170,8 @@ public class PVector implements Serializable { } /** - * - * @webref pvector:method * @param x the x component of the vector * @param y the y component of the vector - * @brief Set the x, y components of the vector */ public void set(float x, float y) { this.x = x; diff --git a/core/src/processing/opengl/PGraphicsOpenGL.java b/core/src/processing/opengl/PGraphicsOpenGL.java index a6e70a86a..12c6fe413 100644 --- a/core/src/processing/opengl/PGraphicsOpenGL.java +++ b/core/src/processing/opengl/PGraphicsOpenGL.java @@ -6250,11 +6250,15 @@ public class PGraphicsOpenGL extends PGraphics { protected void updateTexture(PImage img, Texture tex) { if (tex != null) { - int x = img.getModifiedX1(); - int y = img.getModifiedY1(); - int w = img.getModifiedX2() - x; - int h = img.getModifiedY2() - y; - tex.set(img.pixels, x, y, w, h, img.format); + if (img.isModified()) { + int x = img.getModifiedX1(); + int y = img.getModifiedY1(); + int w = img.getModifiedX2() - x; + int h = img.getModifiedY2() - y; + tex.set(img.pixels, x, y, w, h, img.format); + } else if (img.isLoaded()) { + tex.set(img.pixels, 0, 0, img.width, img.height, img.format); + } } img.setModified(false); img.setLoaded(false); diff --git a/core/src/processing/opengl/Texture.java b/core/src/processing/opengl/Texture.java index db3c165e9..5ffd60b0b 100644 --- a/core/src/processing/opengl/Texture.java +++ b/core/src/processing/opengl/Texture.java @@ -329,8 +329,7 @@ public class Texture implements PConstants { return; } - if (pixels.length == 0) { - // Nothing to do (means that w == h == 0) but not an erroneous situation + if (pixels.length == 0 || w == 0 || h == 0) { return; } diff --git a/core/todo.txt b/core/todo.txt index 83928da74..96f30e092 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -1,5 +1,29 @@ 0226 core X fix parsing with missing categorical values +X fix for splice() throwing a ClassCastException with other object types +X https://github.com/processing/processing/issues/1445 +X https://github.com/processing/processing/pull/2461 +X add candDraw() method to the retina renderer +X fix sketchPath() issue when used in another environment + +andres +X Fonts from loadFont() show up as blocks in P3D (regression) +X https://github.com/processing/processing/issues/2465 + +_ "Buffers have not been created" error for sketches w/o draw() +_ https://github.com/processing/processing/issues/2469 +_ could not reproduce + +net +X add disconnectEvent() to Server +X https://github.com/processing/processing/pull/2466 +X https://github.com/processing/processing/issues/2133 +_ decide how this should actually be handled +_ was disconnect always there? +_ will need documentation +_ modernize Client/Server code to use synchronized lists +_ do we let people use the public vars in Server and Client? +_ are they documented? _ XML.getChildren() throwing NPE when getInt() called on non-existent var @@ -34,6 +58,7 @@ _ https://github.com/processing/processing/issues/2012 _ may have been introduced between 2.0b7 and 2.0b8 _ https://github.com/processing/processing/issues/2275 _ https://github.com/processing/processing/issues/2276 +_ https://github.com/processing/processing/issues/2483 _ add option to have full screen span across screens _ display=all in cmd line _ sketchDisplay() -> 0 for all, or 1, 2, 3... diff --git a/java/examples/Books/Processing Handbook/Illustrations/page_228/page_228.pde b/java/examples/Books/Processing Handbook/Illustrations/page_228/page_228.pde index 81ce7bfd2..e7c782ebd 100755 --- a/java/examples/Books/Processing Handbook/Illustrations/page_228/page_228.pde +++ b/java/examples/Books/Processing Handbook/Illustrations/page_228/page_228.pde @@ -1,6 +1,7 @@ // Based on code 26-04 (p. 231) +import processing.pdf.*; int dragX, dragY, moveX, moveY; boolean record = false; @@ -42,4 +43,4 @@ void mouseDragged() { // Move black circle void keyReleased() { record = true; } - + diff --git a/java/examples/Books/Processing Handbook/Illustrations/page_326/page_326.pde b/java/examples/Books/Processing Handbook/Illustrations/page_326/page_326.pde index c94986e78..efbbbfa1b 100755 --- a/java/examples/Books/Processing Handbook/Illustrations/page_326/page_326.pde +++ b/java/examples/Books/Processing Handbook/Illustrations/page_326/page_326.pde @@ -1,6 +1,7 @@ // Based on code 36-07 (p. 331) +import processing.pdf.*; PFont f; String s = "012345678901234567890123456789"; @@ -95,4 +96,4 @@ void draw() { void keyPressed() { record = true; -} +} diff --git a/java/examples/Books/Processing Handbook/Illustrations/page_394/page_394.pde b/java/examples/Books/Processing Handbook/Illustrations/page_394/page_394.pde index 03f9fe007..23f66b34e 100755 --- a/java/examples/Books/Processing Handbook/Illustrations/page_394/page_394.pde +++ b/java/examples/Books/Processing Handbook/Illustrations/page_394/page_394.pde @@ -1,6 +1,7 @@ // Based on code 43-02 (p. 409) +import processing.pdf.*; Ring[] rings; // Declare the array int numRings = 50; @@ -77,4 +78,4 @@ class Ring { ellipse(x, y, diameter, diameter); } } -} +} diff --git a/java/examples/Books/Processing Handbook/Illustrations/page_476/page_476.pde b/java/examples/Books/Processing Handbook/Illustrations/page_476/page_476.pde index 6b7e3006e..f08f7efe8 100755 --- a/java/examples/Books/Processing Handbook/Illustrations/page_476/page_476.pde +++ b/java/examples/Books/Processing Handbook/Illustrations/page_476/page_476.pde @@ -2,6 +2,8 @@ // Based on code 50-12 (p. 486) // Requires Particle, ArrowParticle classes +import processing.pdf.*; + int num = 900; ArrowParticle[] p = new ArrowParticle[num]; float radius = 1.2; @@ -40,4 +42,4 @@ void mousePressed() { record = true; } - + diff --git a/java/examples/Topics/Animation/Sequential/Sequential.pde b/java/examples/Topics/Animation/Sequential/Sequential.pde index 290801fb1..89a1f3b91 100644 --- a/java/examples/Topics/Animation/Sequential/Sequential.pde +++ b/java/examples/Topics/Animation/Sequential/Sequential.pde @@ -13,7 +13,7 @@ PT_anim0004.gif, PT_anim0005.gif, PT_anim0006.gif, PT_anim0007.gif, PT_anim0008. PT_anim0009.gif, PT_anim0010.gif, PT_anim0011.gif"; */ int numFrames = 12; // The number of frames in the animation -int frame = 0; +int currentFrame = 0; PImage[] images = new PImage[numFrames]; void setup() { @@ -46,12 +46,12 @@ void setup() { void draw() { background(0); - frame = (frame+1) % numFrames; // Use % to cycle through frames + currentFrame = (currentFrame+1) % numFrames; // Use % to cycle through frames int offset = 0; for (int x = -100; x < width; x += images[0].width) { - image(images[(frame+offset) % numFrames], x, -20); + image(images[(currentFrame+offset) % numFrames], x, -20); offset+=2; - image(images[(frame+offset) % numFrames], x, height/2); + image(images[(currentFrame+offset) % numFrames], x, height/2); offset+=2; } } diff --git a/todo.txt b/todo.txt index 23b39471e..a25038197 100644 --- a/todo.txt +++ b/todo.txt @@ -1,12 +1,30 @@ 0226 pde +X sketches only starting once, or half-starting and hanging +X https://github.com/processing/processing/issues/2402 +X https://github.com/processing/processing/pull/2455 +X reopen current sketch in new mode editor if file extension is compatible +X https://github.com/processing/processing/pull/2457 +X https://github.com/processing/processing/issues/2456 +X crash in the 'recent' menu on startup +X https://github.com/processing/processing/issues/2463 +X sketchbook location is set to an actual sketch (huh?) +X exported apps on Windows 64 not working? +X https://github.com/processing/processing/issues/2468 +X just needed to add the local path for Java +X when exporting with local Java embedded, use that version +X https://github.com/processing/processing/issues/2349 +X (we can do this now since we're actually doing the embedding) high +_ new launch4j 3.4 +_ http://sourceforge.net/projects/launch4j/files/launch4j-3/3.4/ _ sketch sometimes simply does not launch _ https://github.com/processing/processing/issues/2402 _ https://github.com/processing/processing/pull/2455 _ exported apps reporting as "damaged" on OS X -_ https://github.com/processing/processing/issues/2095 +_ JNA conflicts can be avoided with a -D option +_ https://github.com/processing/processing/issues/2239 _ QuickReference tool was able to bring down the environment _ https://github.com/processing/processing/issues/2229 _ tab characters not recognized/drawn in the editor (2.1) @@ -23,22 +41,24 @@ _ maybe OS X Java can't look in subfolders? (just auto-adds things) medium +_ import static causes exception (with fix) +_ https://github.com/processing/processing/issues/8 +o https://github.com/processing/processing/pull/2273 +X can't use this patch, too confusing _ re/move things from Google Code downloads _ https://code.google.com/p/support/wiki/DownloadsFAQ -_ actual help with cleaning out the repo +_ clean out the repo _ https://github.com/processing/processing/issues/1898 _ requires re-forking, so still a ton of work +_ remove non-web stuff from web +_ remove non-android stuff from android +_ remove web and android from the main repo _ add font fixes to the rest of the API _ https://github.com/processing/processing/commit/eaff673d173b2d27f276cf5c59e3abf6c0fab86b _ g2.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, _ RenderingHints.VALUE_FRACTIONALMETRICS_ON); -_ when exporting with local Java embedded, use that version -_ https://github.com/processing/processing/issues/2349 -_ (we can do this now since we're actually doing the embedding) _ get stack trace issues with NPE _ https://github.com/processing/processing/pull/2359 -_ JNA conflicts can be avoided with a -D option -_ https://github.com/processing/processing/issues/2239 _ dataPath() not working when app is not run from app dir _ https://github.com/processing/processing/issues/2195 _ should default to the local Java on Windows and Linux @@ -69,14 +89,17 @@ _ emacs style errors in commander aren't quite right _ https://github.com/processing/processing/issues/2158 _ export application folder location (for Manindra) _ https://github.com/processing/processing/issues/2399 -_ import static causes exception (with fix) -_ https://github.com/processing/processing/issues/8 -_ https://github.com/processing/processing/pull/2273 _ add documentation for how to run mode development from Eclipse _ implementation/changes from JDF +_ modes are being loaded multiple times, which can cause trouble +_ add minimum version required (or max version?) to libraries/modes/etc pulls +_ if/else formatting is broken +_ https://github.com/processing/processing/pull/2477 +_ fix for various net issues +_ https://github.com/processing/processing/pull/2475 _ may need a progress bar for "save as" _ or just the file copy function in general _ since it may take a long time (i.e. 1000s of screen grabs) @@ -489,6 +512,7 @@ _ but don't do this with untitled, cuz it kinda stinks _ this is too weird--just put examples into individual zip files _ mark example files as untitled _ though will that require the sketch to be saved before export? +_ https://github.com/processing/processing/issues/2459 _ examples window sketches should load in proper environment _ write build.xml file to automatically update the examples _ sketch.isReadOnly returns false for examples coming from multiple modes @@ -565,6 +589,7 @@ _ https://github.com/processing/processing/issues/943 PDE / Manager +_ ability to cancel a download/install _ we shouldn't use .properties extension for modes, et al _ because a .properties file is iso8859-1 _ make note that .properties file *must* be utf-8