Closed claudio-rosati closed 7 years ago
I have to investigate this and will come back to you.
On Linux, everything works as expected (*.foo are shown and can be loaded). I will check it on a Mac as well.
The class which manages the FileChooser: https://github.com/Drombler/drombler-fx/blob/develop/drombler-fx-core-data/src/main/java/org/drombler/fx/core/data/impl/FXFileChooserProvider.java
Hello @puce77,
I've done some tests (see file-chooser-test.zip) to understand how the filter mus be built to work on the various platforms. With the test application one should be able to select a sample.foo
file somewere in the disk.
I've installed 4 filters:
The results are the following:
On MacOS X "foo" will selects files without extensions whose name ends in 'foo".
That said, my proposal is to change line 88 of FXFileChooserProvider.java to the following:
.map(fileExtension -> WILDCARD + "." + fileExtension.toLowerCase())
(Or include '.' inside WILDCARD).
Hello,
in the sample application, then FooHandler uses a file extension set to
"foo"
.On my mac, when I select
Fille > Open
ony files named"foo"
can be selected when the filter isFoo Document [foo]
.To open file whose extension is .foo I have to use
"*.foo"
instead (displayed asFoo Document [*.foo]
filter in the open dialog).I don't understand if this is a bug or not. In the last case maybe a short description should be provided in the tutorial.
Anyway, once the file is correctly selected, no editor is displayed, no error messages in console.
Configuration: