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 {
static final int VERSION = 3;
static final String VERSION_NAME = "0004 Alpha";
static final String VERSION_NAME = "0005 Alpha";
// 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();
running = true;
buttons.activate(EditorButtons.RUN);
@ -1299,6 +1299,8 @@ public class Editor extends JFrame
}
}
SwingUtilities.invokeLater(new Runnable() {
public void run() {
try {
if (!sketch.handleRun(new Target(
System.getProperty("user.dir") + File.separator + "lib" +
@ -1318,6 +1320,7 @@ public class Editor extends JFrame
} catch (Exception e) {
e.printStackTrace();
}
}});
// this doesn't seem to help much or at all
/*
@ -1961,13 +1964,15 @@ public class Editor extends JFrame
System.exit(0);
}
protected void handleBurnBootloader(boolean parallel) {
protected void handleBurnBootloader(final boolean parallel) {
if(debugging)
doStop();
console.clear();
//String what = sketch.isLibrary() ? "Applet" : "Library";
//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 {
//boolean success = sketch.isLibrary() ?
//sketch.exportLibrary() : sketch.exportApplet();
@ -1989,6 +1994,7 @@ public class Editor extends JFrame
e.printStackTrace();
}
buttons.clear();
}});
}
public void highlightLine(int lnum) {

View File

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