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

Already on GitHub? Sign in to your account

added :suggested-name option to choose-file #157

Merged
merged 1 commit into from Mar 28, 2017

Conversation

Projects
None yet
3 participants
Contributor

mschuene commented Nov 13, 2013

Added :suggested-name option to choose-file. See Issue #156

@daveray daveray commented on the diff Nov 15, 2013

src/seesaw/chooser.clj
@@ -65,7 +65,11 @@
(apply file-filter f)
:else
- (illegal-argument "not a valid filter: %s" f)))))
+ (illegal-argument "not a valid filter: %s" f)))))
+
+(defn- set-suggested-name [^JFileChooser chooser suggested-name]
+ (.setSelectedFile chooser (if (instance? java.io.File suggested-name)
@daveray

daveray Nov 15, 2013

Owner

You can get a file instance cleaner by just using clojure.java.io/file.

Owner

daveray commented Nov 15, 2013

Thanks! I'll test it out and merge this weekend.

yegortimoshenko commented Mar 28, 2017

@daveray choose-file immediately shows the window and blocks, so there's no way to work around this. I have to drop back to plain JFileChooser. Could you merge this?

@daveray daveray merged commit d63cc80 into daveray:develop Mar 28, 2017

1 check passed

default The Travis CI build passed
Details
Owner

daveray commented Mar 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment