From ef1ca11caedc9c7cefb3bdf2eb4a88a5f4e160e9 Mon Sep 17 00:00:00 2001 From: benfry Date: Thu, 8 Jul 2004 21:16:37 +0000 Subject: [PATCH] more good times --- app/PdePreprocessor.java | 6 ++++-- build/shared/lib/preferences.txt | 2 +- todo.txt | 8 ++++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app/PdePreprocessor.java b/app/PdePreprocessor.java index d945a43e2..4581be406 100644 --- a/app/PdePreprocessor.java +++ b/app/PdePreprocessor.java @@ -231,7 +231,9 @@ public class PdePreprocessor { */ void writeHeader(PrintStream out, String imports[], String className) { - //out.print("package pootime;"); + + // must include processing.core + out.print("import processing.core.*; "); // emit emports that are needed for classes from the code folder if (imports != null) { @@ -260,7 +262,7 @@ public class PdePreprocessor { if (programType == STATIC) { // now that size() and background() can go inside of draw() - out.print("void draw() {"); + out.print("public void draw() {"); } } } diff --git a/build/shared/lib/preferences.txt b/build/shared/lib/preferences.txt index 7c402a50f..0cb392a4d 100755 --- a/build/shared/lib/preferences.txt +++ b/build/shared/lib/preferences.txt @@ -196,7 +196,7 @@ compiler.output_parse_tree = false compiler.jdk_version = 1.1 # base imports to include for java 1.1 (or higher) -compiler.imports.jdk11 = processing.core,java.applet,java.awt,java.awt.image,java.awt.event,java.io,java.net,java.text,java.util,java.util.zip,netscape.javascript +compiler.imports.jdk11 = java.applet,java.awt,java.awt.image,java.awt.event,java.io,java.net,java.text,java.util,java.util.zip,netscape.javascript # additional imports when exporting to java 1.3 or higher compiler.imports.jdk13 = javax.sound.midi,javax.sound.midi.spi,javax.sound.sampled,javax.sound.sampled.spi diff --git a/todo.txt b/todo.txt index 758311574..f12f881b9 100644 --- a/todo.txt +++ b/todo.txt @@ -228,6 +228,12 @@ X ask creas about src or dest in image functions X finish imaging api X modify make.sh to build processing.core +040708 afternoon +X lots of work on making packaged classes work +X modify preproc to handle "void setup" -> "public void setup" +o preproc bug: text(String.valueOf(i+1), left + i*20, top); +o unexpected token "String" + _ casting working properly.. int() maps to toInt()? _ what is performance hit for this thing? _ processing.app -> PdeBase, PdeEditor.. @@ -346,8 +352,6 @@ _ but also potential stop() for individual items BUGS / preproc -_ preproc bug: text(String.valueOf(i+1), left + i*20, top); -_ unexpected token "String" _ casting problems in the parser _ float u = float(x)/width; works. _ float u = (float(x)/width); doesn't work: "unexpected token: float".