From dd7c4d8726460f26432c38ca2bd09bcff93607b6 Mon Sep 17 00:00:00 2001 From: benfry Date: Sat, 7 May 2005 02:55:27 +0000 Subject: [PATCH] minor bug fixes, make archive sketch auto-save before running --- app/Base.java | 2 +- app/Sketch.java | 4 +++- app/tools/Archiver.java | 14 ++++++++++++++ todo.txt | 16 +++++++--------- 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/app/Base.java b/app/Base.java index b97e87062..33466ddc4 100644 --- a/app/Base.java +++ b/app/Base.java @@ -51,7 +51,7 @@ import processing.core.*; */ public class Base { static final int VERSION = 87; - static final String VERSION_NAME = "0087 Beta"; + static final String VERSION_NAME = "0088 Beta"; /** * Path of filename opened on the command line, diff --git a/app/Sketch.java b/app/Sketch.java index f89b82926..ea02e5dcc 100644 --- a/app/Sketch.java +++ b/app/Sketch.java @@ -298,7 +298,9 @@ public class Sketch { renamingCode = true; String prompt = (current == code[0]) ? "New name for sketch:" : "New name for file:"; - editor.status.edit(prompt, current.name); + String oldName = + (current.flavor == PDE) ? current.name : current.name + ".java"; + editor.status.edit(prompt, oldName); } diff --git a/app/tools/Archiver.java b/app/tools/Archiver.java index 940cca897..095818fa2 100755 --- a/app/tools/Archiver.java +++ b/app/tools/Archiver.java @@ -54,6 +54,20 @@ public class Archiver { public void show() { + // first save the sketch so that things don't archive strangely + boolean success = false; + try { + success = editor.sketch.save(); + } catch (Exception e) { + e.printStackTrace(); + } + if (!success) { + Base.showWarning("Couldn't archive sketch", + "Archiving the sketch has been canceled because\n" + + "the sketch couldn't save properly.", null); + return; + } + File location = editor.sketch.folder; String name = location.getName(); File parent = new File(location.getParent()); diff --git a/todo.txt b/todo.txt index 07454a6c6..23ff7937f 100644 --- a/todo.txt +++ b/todo.txt @@ -8,19 +8,17 @@ X check to make sure this still works on the fc3 box _ stick with the rh73/fc3 build, include instructions on the site _ maybe have the script test for jikes first? _ try test run, if it closes w/ an error, then show error - X exceptions in other tabs not comunig through X http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1115415184;start=0 - -_ renaming a .java file only shows the name w/o .java -_ which makes you rename the file to a .pde instead -_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Collaboration;action=display;num=1115122925;start=3 - -_ archive sketch not saving the entire sketch? -_ http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1115187666;start=0 +X renaming a .java file only shows the name w/o .java +X which makes you rename the file to a .pde instead +X http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Collaboration;action=display;num=1115122925;start=3 +X archive sketch not saving the entire sketch? +X make the sketch save first +X http://processing.org/discourse/yabb_beta/YaBB.cgi?board=SoftwareBugs;action=display;num=1115187666;start=0 _ error messages from external not coming through very well -_ especially on macosx.. is it writing to stdout/stderr tho? +_ especially on macosx.. is it writing to stdout.txt tho? _ figure out why it's killing things early? the process maybe?