From c1a60c40eddc350b8ad9651722d099a8577a11c1 Mon Sep 17 00:00:00 2001 From: benfry Date: Thu, 1 Aug 2002 06:30:38 +0000 Subject: [PATCH] final touches on 39 --- processing/app/KjcEngine.java | 11 +++++++++-- processing/app/PdeEditor.java | 14 ++++++++++++++ processing/build/shared/readme.txt | 3 ++- processing/todo.txt | 22 ++++++++++++++-------- 4 files changed, 39 insertions(+), 11 deletions(-) diff --git a/processing/app/KjcEngine.java b/processing/app/KjcEngine.java index 271b6cd7f..50987b7e3 100644 --- a/processing/app/KjcEngine.java +++ b/processing/app/KjcEngine.java @@ -231,12 +231,14 @@ public class KjcEngine extends PdeEngine { PatternCompiler compiler = new Perl5Compiler(); Pattern pattern = null; + + ///////// grab (first) reference to size() + + // hack so that the regexp below works if (program.indexOf("size(") == 0) program = " " + program; try { - //pattern = compiler.compile("\ssize\(\d+),\s*(\d+)\)\;"); - //pattern = compiler.compile("^[^A-Za-z0-9_]+size\\(\\s*(\\d+),\\s*(\\d+)\\s*\\);"); pattern = compiler.compile("^([^A-Za-z0-9_]+)(size\\(\\s*\\d+,\\s*\\d+\\s*\\);)"); @@ -255,11 +257,16 @@ public class KjcEngine extends PdeEngine { //int wide = Integer.parseInt(result.group(1).toString()); //int high = Integer.parseInt(result.group(2).toString()); sizeInfo = "void setup() { " + result.group(0) + " } "; + //sizeInfo = result.group(0); } else { // no size() defined, make it 100x100 } + + // grab (first) reference to background() + + // remove references to size() // this winds up removing every reference to size() // not really intended, but will help things work diff --git a/processing/app/PdeEditor.java b/processing/app/PdeEditor.java index 46b49bcf0..1d4a33ffc 100644 --- a/processing/app/PdeEditor.java +++ b/processing/app/PdeEditor.java @@ -578,6 +578,13 @@ public class PdeEditor extends Panel { // make empty pde file File sketchFile = new File(sketchDir, sketchName + ".pde"); new FileOutputStream(sketchFile); +#ifdef MACOS + if (PdeBase.platform == PdeBase.MACOS9) { + MRJFileUtils.setFileTypeAndCreator(sketchFile, + MRJOSType.kTypeTEXT, + new MRJOSType("Pde1")); + } +#endif // make 'data' 'applet' dirs inside that // actually, don't, that way can avoid too much extra mess @@ -1036,6 +1043,13 @@ public class PdeEditor extends Panel { ps.println(" "); ps.flush(); ps.close(); +#ifdef MACOS + if (PdeBase.platform == PdeBase.MACOS9) { + MRJFileUtils.setFileTypeAndCreator(sketchFile, + MRJOSType.kTypeTEXT, + new MRJOSType("MSIE")); + } +#endif String exportDir = ("lib" + File.separator + "export" + File.separator); diff --git a/processing/build/shared/readme.txt b/processing/build/shared/readme.txt index 5bda17d81..2f856d691 100644 --- a/processing/build/shared/readme.txt +++ b/processing/build/shared/readme.txt @@ -171,7 +171,8 @@ follow their bizarre instructions. on my machine, i'm using a keyspan 28X dual port adapter, and the selection i use on the serial port menu reads "/dev/cu.USA28X21P1.1". your mileage may vary. -linux.. haven't tested but you'll need rxtx and elbow grease. +linux.. haven't tested but it's the ibm vm and their own +implementation, so it may just work. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . diff --git a/processing/todo.txt b/processing/todo.txt index 440fc5f1c..741b458d9 100644 --- a/processing/todo.txt +++ b/processing/todo.txt @@ -26,6 +26,10 @@ X -> seems to have fixed itself (?) X test presentation mode for window sizing status on macos X serial port code needs to be implemented X something that docks better to java serial api +X implement menuitem to load ref and to launch p5.net +X MRJFileUtils.openURL(String url) throws IOException +X also, ref should go to index page, not environment +X check to see if lines for error messages are off in macos pde @@ -39,18 +43,10 @@ a _ text editor? jedit's textarea class? hmm? hmm? a _ make win/linux write stderr to stderr.txt like the mac a _ this will be useful until i implement scrollbar -macos9 -a _ set file type/creator for .pde files.. TEXTPde1 macosx a _ arrow keys don't work in the textarea -macos -a _ implement menuitem to load ref and to launch p5.net -a _ MRJFileUtils.openURL(String url) throws IOException -a _ also, ref should go to index page, not environment -a _ check to see if lines for error messages are off - windows a _ splash screen.. check win95 book for simple code @@ -59,6 +55,8 @@ a _ finish writing 'readme.txt' a _ change download/index.html to not describe dates but process a _ "this is alpha, we're heading to beta with series of sm releases" a _ document serial a bit more in release notes +a _ how do we encourage/point to updates? +a _ auto updater? check for releases page in menu? a _ this code is not performing correctly @@ -389,6 +387,13 @@ b _ under osx, app won't get doc unless app already launched b _ dataInputStream, setUseCaches on the url to false b _ URLConnection.setUseCaches(false) b _ parent.obj.close() on the url +b _ set file type/creator for .pde files.. TEXTPde1 +b _ also for .jar and .html for files on export +b _ not sure whether to enable this for osx or not.. + + +PDE / macos9 +b _ make sure editor window is front so that error line highlights PDE / macosx @@ -398,6 +403,7 @@ b _ remove 'quit' from file menu PDE / linux b _ splash screen +b _ test serial with ibm vm and all PDE / features