From d293ae2c62c1c43cf153d0ee416dab5088cf7155 Mon Sep 17 00:00:00 2001 From: benfry Date: Tue, 19 Nov 2002 07:05:09 +0000 Subject: [PATCH] serial port message.. in progress --- processing/app/PdeBase.java | 11 ++++++++++- processing/app/PdeEditor.java | 9 +++++++++ processing/todo.txt | 11 ++++++----- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/processing/app/PdeBase.java b/processing/app/PdeBase.java index c94af5437..fae968526 100644 --- a/processing/app/PdeBase.java +++ b/processing/app/PdeBase.java @@ -721,7 +721,7 @@ public class PdeBase extends Frame implements ActionListener { while (portList.hasMoreElements()) { CommPortIdentifier portId = (CommPortIdentifier) portList.nextElement(); - + if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) { //if (portId.getName().equals(port)) { String name = portId.getName(); @@ -732,6 +732,15 @@ public class PdeBase extends Frame implements ActionListener { serialMenu.add(mi); } } + } catch (UnsatisfiedLinkError e) { + e.printStackTrace(); + JOptionPane.showMessageDialog(frame, + "Serial port support not installed. " + + "Check the readme for instructions if you " + + "need to use the serial port", + "Serial Port Warning", + JOptionPane.WARNING_MESSAGE); + } catch (Exception e) { System.out.println("exception building serial menu"); e.printStackTrace(); diff --git a/processing/app/PdeEditor.java b/processing/app/PdeEditor.java index 7bd062b73..f471ba95a 100644 --- a/processing/app/PdeEditor.java +++ b/processing/app/PdeEditor.java @@ -1072,6 +1072,15 @@ afterwards, some of these steps need a cleanup function // (important!) has to be done before opening, // otherwise the new dir is set to sketchDir.. + // remove .jar, .class, and .java files from the applet dir + File appletDir = new File(newSketchDir, "applet"); + File oldjar = new File(appletDir, sketchName + ".jar"); + if (oldjar.exists()) oldjar.delete(); + File oldjava = new File(appletDir, sketchName + ".java"); + if (oldjava.exists()) oldjava.delete(); + File oldclass = new File(appletDir, sketchName + ".class"); + if (oldclass.exists()) oldclass.delete(); + base.rebuildSketchbookMenu(); // open the new guy diff --git a/processing/todo.txt b/processing/todo.txt index f6821bdf0..65a32d928 100644 --- a/processing/todo.txt +++ b/processing/todo.txt @@ -47,6 +47,12 @@ X when renaming a sketch, select the text in the field, X so you can type the new name immediately. X added 'rename' command X also the default for clicking on the sketch's title +o option to rename when doing a 'save as' (remove old files) +X remove .class files on save as [dimitre] +X remove .jar, .class, and .java files from the 'applet' dir +When I am working in a project and I save it with another name, +all the old files are copyied to new directory, and some of the old +unused .class files and images remains inside new project JAR files. bagel _ images don't load during setup() @@ -60,11 +66,6 @@ _ font smoothing (unless hint SMOOTH_IMAGES enabled) is broken pde _ set frame title of launched window to the name of the sketch -_ option to rename when doing a 'save as' (remove old files) -_ remove .class files on save as [dimitre] -When I am working in a project and I save it with another name, -all the old files are copyied to new directory, and some of the old -unused .class files and images remains inside new project JAR files. _ use date in the sketch name sketch_021104 _ with a _2 if needed or '021104a' '021104b' etc _ when using save as, allow to remove the old (numbered) sketch