http://bugzilla.ecoinformatics.org/show_bug.cgi?id=4112
--- Comment #9 from Christopher Brooks <[email protected]> 2012-06-27 10:44:51 PDT --- Dan writes: > When saving, JFileChooser does not ask to overwrite existing files, but > FileDialog does. It would be nice if PtFileChooser.showDialog would ask when > using JFileChooser. I'm a little nervous about modifying PtFileChooser.showDialog() to check to see if the file exists because showDialog() can be called to open a file as well as save a file. Also, we would need to update the places where we call showDialog() so that they would not then check again to see if we want to overwrite a file. Note that BasicGraphFrame has convoluted code like: // The Mac OS X FileDialog will ask if we want to save before this point. if (imageFile.exists() && !PtGUIUtilities.useFileDialog()) { if (!MessageHandler.yesNoQuestion("Overwrite \"" + imageFile.getName() + "\"?")) { return; } } Adding new method that did the check could be useful though. Perhaps the method could be called PtFileChooser.showDialog(boolean askAboutOverwrite) or something. Dan, do you want to give it a shot? -- Configure bugmail: http://bugzilla.ecoinformatics.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. _______________________________________________ Kepler-dev mailing list [email protected] http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev
