fixing some issues with saving files

This commit is contained in:
benfry
2004-06-20 23:52:56 +00:00
parent a1126689a3
commit f1872ecb3f
5 changed files with 21 additions and 6 deletions

View File

@@ -73,9 +73,9 @@ public class PdeCode {
//history.record(s, PdeHistory.SAVE);
try {
System.out.println("saving to " + file);
System.out.println("stuff to save: " + program);
System.out.println("-------");
//System.out.println("saving to " + file);
//System.out.println("stuff to save: " + program);
//System.out.println("-------");
PdeBase.saveFile(program, file);
} catch (Exception e) {

View File

@@ -1126,7 +1126,10 @@ public class PdeEditor extends JFrame
//if (!sketch.isModified()) {
//if (sketch.modified) checkModified2();
if (!sketch.modified) checkModified2();
if (!sketch.modified) {
checkModified2();
return;
}
String prompt = "Save changes to " + sketch.name + "? ";

View File

@@ -276,7 +276,7 @@ public class PdeEditorHeader extends JComponent /*implements MouseListener*/ {
* Called when a new sketch is opened.
*/
public void rebuild() {
System.out.println("rebuilding editor header");
//System.out.println("rebuilding editor header");
rebuildMenu();
repaint();
}

View File

@@ -227,7 +227,7 @@ public class PdeSketch {
//public void setCurrentModified(boolean what) {
//public void setModified(boolean what) {
public void setModified() {
System.out.println("setting modified for " + current.program);
//System.out.println("setting modified for " + current.program);
//modified = true;
current.modified = true;
//editor.header.repaint();

View File

@@ -9,6 +9,18 @@ o test by rewriting with java.awt.Menu
X beautify is ignoring the setting for number of spaces on tabs
X http://processing.org/discourse/yabb/YaBB.cgi?board=Proce55ing_software_bugs;action=display;num=1083708360;start=0
X clean up PdeTokenMarker, probably just alphabetize
X saving issues (all the same bug, as it turns out)
X save changes to null
X sketch is changing before the "save changes?" is complete
X as a result, 'cancel' does nothing
X always ask save changes, even if nothing changed
mangling and mess
_ remove the 'sketchbook.prompt' mess
_ re-implement history
_ write sketchbook.clean()
_ write 'new text file'
_ NullPointerException when alt is pressed