From ee34a5debe43fc8bf5023cc7e18e9cfb5f86d27c Mon Sep 17 00:00:00 2001 From: benfry Date: Mon, 10 May 2004 04:30:31 +0000 Subject: [PATCH] further working on clearing up compile errors --- processing/app/PdePreprocessor.java | 11 ++++++----- processing/app/PdeRuntime.java | 5 +++-- processing/app/PdeSketch.java | 2 +- processing/app/PdeSketchbook.java | 5 +++-- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/processing/app/PdePreprocessor.java b/processing/app/PdePreprocessor.java index 1d6ff08c4..c2c9dd62b 100644 --- a/processing/app/PdePreprocessor.java +++ b/processing/app/PdePreprocessor.java @@ -57,11 +57,11 @@ public class PdePreprocessor { */ public PdePreprocessor() { defaultImports[JDK11] = - BApplet.splitStrings(PdePreferences.get("compiler.imports.jdk11"), ','); + BApplet.split(PdePreferences.get("compiler.imports.jdk11"), ','); defaultImports[JDK13] = - BApplet.splitStrings(PdePreferences.get("compiler.imports.jdk13"), ','); + BApplet.split(PdePreferences.get("compiler.imports.jdk13"), ','); defaultImports[JDK14] = - BApplet.splitStrings(PdePreferences.get("compiler.imports.jdk14"), ','); + BApplet.split(PdePreferences.get("compiler.imports.jdk14"), ','); } @@ -105,13 +105,14 @@ public class PdePreprocessor { p2[index++] = 'u'; char str[] = Integer.toHexString(c).toCharArray(); // add leading zeros, so that the length is 4 - for (int i = 0; i < 4 - str.length; i++) p2[index++] = '0'; + //for (int i = 0; i < 4 - str.length; i++) p2[index++] = '0'; + for (int m = 0; m < 4 - str.length; m++) p2[index++] = '0'; System.arraycopy(str, 0, p2, index, str.length); index += str.length; } } + program = new String(p2, 0, index); } - program = new String(p2, 0, index); } // do this after the program gets re-combobulated diff --git a/processing/app/PdeRuntime.java b/processing/app/PdeRuntime.java index 90e47f12e..369c9a273 100644 --- a/processing/app/PdeRuntime.java +++ b/processing/app/PdeRuntime.java @@ -80,7 +80,7 @@ public class PdeRuntime implements PdeMessageConsumer { // using something like --external=e30,20 where the e stands for // exact. otherwise --external=x,y for just the regular positioning. String location = (windowLocation != null) ? - (BApplet.EXACT_LOCATION + + (BApplet.EXTERNAL_EXACT_LOCATION + windowLocation.x + "," + windowLocation.y) : (x1 + "," + y1); @@ -100,7 +100,8 @@ public class PdeRuntime implements PdeMessageConsumer { processOutput = process.getOutputStream(); } else { - Class c = Class.forName(className); + //Class c = Class.forName(className); + Class c = Class.forName(sketch.mainClassName); applet = (BApplet) c.newInstance(); // replaces setRuntime with BApplet having leechErr [fry] diff --git a/processing/app/PdeSketch.java b/processing/app/PdeSketch.java index 176355263..2119f432a 100644 --- a/processing/app/PdeSketch.java +++ b/processing/app/PdeSketch.java @@ -697,7 +697,7 @@ public class PdeSketch { boolean writeHtml = true; if (appletDir.exists()) { - File htmlFile = new new File(appletDir, "index.html"); + File htmlFile = new File(appletDir, "index.html"); if (htmlFile.exists() && !replaceHtml) { writeHtml = false; } diff --git a/processing/app/PdeSketchbook.java b/processing/app/PdeSketchbook.java index 5996d7278..e47c568b3 100644 --- a/processing/app/PdeSketchbook.java +++ b/processing/app/PdeSketchbook.java @@ -240,7 +240,8 @@ public class PdeSketchbook { menu.removeAll(); try { - addSketches(menu, sketchbookFolder); + //addSketches(menu, new File(PdePreferences.get("sketchbook.path"))); + addSketches(menu, new File(PdePreferences.get("sketchbook.path"))); menu.addSeparator(); addSketches(menu, examplesFolder); @@ -255,7 +256,7 @@ public class PdeSketchbook { } - protected boolean addSketches(File folder) throws IOException { + protected boolean addSketches(JMenu menu, File folder) throws IOException { // skip .DS_Store files, etc if (!folder.isDirectory()) return false;