Bug #5439
closedfile parameter ignores directory
0%
Description
Choosing a file /tmp/file.txt gets replaced with $KEPLER/file.txt. In Ptolemy it's replaced with $CWD/file.txt.
Updated by Christopher Brooks over 13 years ago
This looks like a problem with my recent FileDialog changes for the Mac.
I'm working on a fix now
Updated by Christopher Brooks over 13 years ago
T
The issue here is that under Mac OS X, we are now using FileDialog instead of JFileChooser
because FileDialog has the native L&F. The problem was that we were not getting the
directory from the FileDialog. There are probably other bugs here, it would be good
to have a better defined testsuite.
To replicate the bug:
1. Under Mac OS X, start up with FileDialog:
java -Dptolemy.ptII.useFileDialog=true -classpath $PTII ptolemy.vergil.VergilApplication
2. File->New->Graph Editor
3. Actors -> IO -> Drag a FileReader in.
4. Double click on the FileReader, hit Browse.
5. Browse to a directory outside the ptII tree, select a text file.
Formerly, the path would be incorrectly set to a path inside
the ptII tree. For example, if I selected /Temp/foo/bar/bif.txt, then
the path would end up as /Users/cxh/ptII/bif.txt