From 023858eab5372fa61c421ff70b6818709aa22206 Mon Sep 17 00:00:00 2001 From: Manindra Moharana Date: Tue, 19 Feb 2013 23:56:22 +0530 Subject: [PATCH] Sketch path now gets picked up from args --- core/src/processing/core/PApplet.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 411bd2200..6d11106b5 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -10202,6 +10202,16 @@ public class PApplet extends Applet argIndex++; } + // Now that sketch path is passed in args after the sketch name + // it's not set in the above loop(the above loop breaks after + // finding sketch name). So setting sketch path here. + for (int i = 0; i < args.length; i++) { + if(args[i].startsWith(ARGS_SKETCH_FOLDER)){ + folder = args[i].substring(args[i].indexOf('=') + 1); + //System.err.println("SF set " + folder); + } + } + // Set this property before getting into any GUI init code //System.setProperty("com.apple.mrj.application.apple.menu.about.name", name); // This )*)(*@#$ Apple crap don't work no matter where you put it