Possible regression: FileDialog allowing selection of files with apple.awt.fileDialogForDirectories == true
Paul Taylor
paul_t100 at fastmail.fm
Sun Sep 8 08:31:24 PDT 2013
On 08/09/2013 11:44, Robert Krüger wrote:
> Hi,
>
> for ages we have been using the following approach to show a native
> file dialog to choose a directory:
>
> FileDialog fileDialog = .....;
>
> fileDialog.setMode(FileDialog.LOAD);
> try {
> System.setProperty("apple.awt.fileDialogForDirectories", "true");
> fileDialog.setVisible(true);
> } finally {
> System.setProperty("apple.awt.fileDialogForDirectories", "false");
> }
>
> Now I noticed with build 103 that this allows me to select files as
> well. Starting the same application with Apple's JDK 6 behaves as
> expected. I cannot prove this right now but I am quite sure that I
> specifically tested this with an OpenJDK 8 build a few months ago and
> it worked. So this appears like a regression but I might be wrong.
>
> Is this known or should I file a bug report?
>
> Regards,
>
> Robert
>
I call System.setProperty() first before I construct the fileDialog I
don't know if that makes any difference.
But that works for me using 7u40 Build b40
Paul
More information about the macosx-port-dev
mailing list