fixed exception on close when trying to create sketch.properties on

linux and mac
This commit is contained in:
benfry
2002-07-23 17:52:51 +00:00
parent a7d018ec9f
commit ea79500249
3 changed files with 19 additions and 9 deletions

View File

@@ -273,13 +273,15 @@ public class PdeBase implements ActionListener {
new SketchbookMenuListener(subPath);
entries = subFolder.list();
for (int j = 0; j < entries.length; j++) {
if ((entries[j].equals(".")) ||
(entries[j].equals(".."))) continue;
//subMenu.add(entries[j]);
MenuItem item = new MenuItem(entries[j]);
item.addActionListener(subMenuListener);
subMenu.add(item);
if (entries != null) {
for (int j = 0; j < entries.length; j++) {
if ((entries[j].equals(".")) ||
(entries[j].equals(".."))) continue;
//subMenu.add(entries[j]);
MenuItem item = new MenuItem(entries[j]);
item.addActionListener(subMenuListener);
subMenu.add(item);
}
}
menu.add(subMenu);

View File

@@ -990,9 +990,14 @@ public class PdeEditor extends Panel {
// write sketch.properties
try {
URL url = getClass().getResource("buttons.gif");
String urlstr = url.toString();
urlstr = urlstr.substring(6, urlstr.lastIndexOf("/") + 1) +
//String urlstr = url.toString();
//System.out.println(url.getFile());
//urlstr = urlstr.substring(6, urlstr.lastIndexOf("/") + 1) +
//"sketch.properties";
String urlstr = url.getFile();
urlstr = urlstr.substring(0, urlstr.lastIndexOf("/") + 1) +
"sketch.properties";
//System.out.println(urlstr);
//System.exit(0);
FileOutputStream output = new FileOutputStream(urlstr);

View File

@@ -1,6 +1,9 @@
0036
X editor.buttons.bgcolor default value was wrong
X sketch.properties exception when closing on linux and mac
X urlstr was garbage because of windows-specific code
_ build macos9 version with JDK13 flag turned off
_ dbn2p5 converter.. ooh!
bagel