Hi Jason,
:filetypes nil
did the trick! I am running OS X 10.10.5 and 'which wish‘ leads
/usr/bin/wish
so i guess it is the version coming with the system. I havn’t installed anything using homebrew.
You are of course totally right regarding *. It failed from time to time but than worked perfect again. I guess that’s a pretty noob error I ran into here.
Thanks for your help!
Martin
Am 14.12.2016 um 05:24 schrieb Jason Miller jason@milr.com:
Quoting Martin Buchmann (2016-12-13 11:54:06)
Hi,
I am trying a create a little gui using ltk which has an open file button using get-open-file. It works fine besides the fact that I cannot select any file. I played around with the filetypes keyword but could not get it running and could not find anything in the net so far which helped me. I actually do not care about the filetype at all.
I have installed ltk via quicklisp on OS X using sbcl.
Which version of OS X? Are you using the system wish, or a version installed from macports/homebrew?
(defun test () (ltk:with-ltk () (let* ((datei (make-instance 'ltk:button :master nil :text "Datei" :command (lambda () (print (ltk:get-open-file :filetypes '(("All Files" "*")) :title "Open"))))))
(ltk:wm-title ltk:*tk* "Test") (ltk:pack datei))))
This worked fine for me.
I get a nice button, the open file dialog opens but all file in the current directory are gray and not selectable. What am I missing?
If I choose
:filetypes *
it works but that’s very different from what I have expected.
That probably only works because the last item from the REPL is nil; :filetypes nil ought to work. (The special variable CL:* is equal to the last value returned at the REPL).
Thanks for any advice Martin