1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-03-15 12:29:26 +01:00

Fixed bug that sometimes uploaded old code versions. Now showing "compiling..." and "burning bootloader" messages. Up'ed version to 0005.

This commit is contained in:
David A. Mellis 2006-07-04 18:57:47 +00:00
parent f636b93381
commit b8923cfeee
3 changed files with 51 additions and 43 deletions

View File

@ -53,7 +53,7 @@ import com.ice.jni.registry.*;
*/ */
public class Base { public class Base {
static final int VERSION = 3; static final int VERSION = 3;
static final String VERSION_NAME = "0004 Alpha"; static final String VERSION_NAME = "0005 Alpha";
// platform IDs for PApplet.platform // platform IDs for PApplet.platform

View File

@ -1269,7 +1269,7 @@ public class Editor extends JFrame
public void handleRun(boolean present) { public void handleRun(final boolean present) {
doClose(); doClose();
running = true; running = true;
buttons.activate(EditorButtons.RUN); buttons.activate(EditorButtons.RUN);
@ -1299,6 +1299,8 @@ public class Editor extends JFrame
} }
} }
SwingUtilities.invokeLater(new Runnable() {
public void run() {
try { try {
if (!sketch.handleRun(new Target( if (!sketch.handleRun(new Target(
System.getProperty("user.dir") + File.separator + "lib" + System.getProperty("user.dir") + File.separator + "lib" +
@ -1318,6 +1320,7 @@ public class Editor extends JFrame
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
}});
// this doesn't seem to help much or at all // this doesn't seem to help much or at all
/* /*
@ -1961,13 +1964,15 @@ public class Editor extends JFrame
System.exit(0); System.exit(0);
} }
protected void handleBurnBootloader(boolean parallel) { protected void handleBurnBootloader(final boolean parallel) {
if(debugging) if(debugging)
doStop(); doStop();
console.clear(); console.clear();
//String what = sketch.isLibrary() ? "Applet" : "Library"; //String what = sketch.isLibrary() ? "Applet" : "Library";
//message("Exporting " + what + "..."); //message("Exporting " + what + "...");
message("Burning bootloader to I/O Board..."); message("Burning bootloader to I/O Board (this may take a minute)...");
SwingUtilities.invokeLater(new Runnable() {
public void run() {
try { try {
//boolean success = sketch.isLibrary() ? //boolean success = sketch.isLibrary() ?
//sketch.exportLibrary() : sketch.exportApplet(); //sketch.exportLibrary() : sketch.exportApplet();
@ -1989,6 +1994,7 @@ public class Editor extends JFrame
e.printStackTrace(); e.printStackTrace();
} }
buttons.clear(); buttons.clear();
}});
} }
public void highlightLine(int lnum) { public void highlightLine(int lnum) {

View File

@ -1736,6 +1736,8 @@ public class Sketch {
// make sure the user didn't hide the sketch folder // make sure the user didn't hide the sketch folder
ensureExistence(); ensureExistence();
current.program = editor.getText();
zipFileContents = new Hashtable(); zipFileContents = new Hashtable();
// nuke the old applet folder because it can cause trouble // nuke the old applet folder because it can cause trouble