From 672ad5648eb0b067cd42e0992331e017c4323a04 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Tue, 16 Jun 2009 19:49:28 +0000 Subject: [PATCH] Allowing (and fixing) uploading of unsaved sketches. --- app/src/processing/app/Editor.java | 2 +- app/src/processing/app/Sketch.java | 3 +++ todo.txt | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java index 475735874..bd9829ea3 100644 --- a/app/src/processing/app/Editor.java +++ b/app/src/processing/app/Editor.java @@ -2146,7 +2146,7 @@ public class Editor extends JFrame implements RunnerListener { * hitting export twice, quickly, and horking things up. */ synchronized public void handleExport() { - if (!handleExportCheckModified()) return; + //if (!handleExportCheckModified()) return; toolbar.activate(EditorToolbar.EXPORT); console.clear(); diff --git a/app/src/processing/app/Sketch.java b/app/src/processing/app/Sketch.java index d320dc0b2..bd976c939 100644 --- a/app/src/processing/app/Sketch.java +++ b/app/src/processing/app/Sketch.java @@ -1392,8 +1392,11 @@ public class Sketch { // Make sure the user didn't hide the sketch folder ensureExistence(); + current.setProgram(editor.getText()); + // Reload the code when an external editor is being used if (Preferences.getBoolean("editor.external")) { + current = null; // nuke previous files and settings load(); } diff --git a/todo.txt b/todo.txt index 096c51bdc..7ece71ef3 100644 --- a/todo.txt +++ b/todo.txt @@ -9,6 +9,8 @@ Add library keyword highlighting. Allow closing of the serial monitor with keyboard short cuts. +Clear serial monitor button when the serial monitor opens. + Support libraries in the SKETCH/code folder? Get rid of unused preferences in the preferences dialog. @@ -44,6 +46,7 @@ Compiler.java Sketch.java - add system-wide include path in preprocess()? - should find libraries in the code/ sub-folder of the sketch folder + - do sketches really need to get built in the applet/ sub-folder when uploading? PreProcessor.java - split write() into writeHeader() and write() as in Processing?