Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File chooser: how to select default filter? #176

Open
acron0 opened this issue Aug 26, 2014 · 4 comments
Open

File chooser: how to select default filter? #176

acron0 opened this issue Aug 26, 2014 · 4 comments

Comments

@acron0
Copy link

acron0 commented Aug 26, 2014

Hiya,

I am tinkering with file chooser at the moment. All I want to do is force it to expose a single filter. I have already added :all-files? (which isn't documented btw) but this just means the default filter is blank and serves exactly the same purpose as 'All Files' anyway...

My code is pretty simple...

(choose-file 
    :all-files? false
    :filters [["COD Files" ["cod"]]]
    :success-fn (fn [fc file] (.getAbsolutePath file)))

Is there anything I can do or is this just another Swing wart?

@daveray
Copy link
Collaborator

daveray commented Sep 2, 2014

I get the same behavior on OSX. I think this might just be a Swing wart, but let me know if you find a workaround :(

@MIvanchev
Copy link
Contributor

This is fixed by pull request #183 where the first filter is automatically selected as the default.

@acron0
Copy link
Author

acron0 commented Nov 11, 2014

Did you mean 182? Can't see the fix...

@MIvanchev
Copy link
Contributor

I mean #183, the pull request. Sorry, updated previous comment as well :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants