tweaks to add manifest file, cleaning up sketch code

This commit is contained in:
benfry
2005-05-01 19:34:57 +00:00
parent 994f76551a
commit 1cca0904e7
4 changed files with 114 additions and 240 deletions

View File

@@ -53,40 +53,24 @@ public class SketchCode {
}
/**
* Load this piece of code from a file.
*/
public void load() throws IOException {
program = Base.loadFile(file);
//program = null;
/*
} catch (IOException e) {
Base.showWarning("Error loading file",
"Error while opening the file\n" +
file.getPath(), e);
program = null; // just in case
*/
//if (program != null) {
//history = new History(file);
//}
modified = false;
}
/**
* Save this piece of code, regardless of whether the modified
* flag is set or not.
*/
public void save() throws IOException {
// TODO re-enable history
//history.record(s, SketchHistory.SAVE);
//try {
//System.out.println("saving to " + file);
//System.out.println("stuff to save: " + program);
//System.out.println("-------");
Base.saveFile(program, file);
modified = false;
//} catch (Exception e) {
//Base.showWarning("Error saving file",
// "Could not save '" + file.getName() + "'\n" +
// "to '" + file.getParent() + "'\n" +
// "because of an error.", e);
//}
}
}