[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: multiple files with choose-file-dialog?
In article <9208272006.AA12235@mipsmath.math.uqam.ca>, email@example.com
(Guillaume Cartier) writes:
> >Is there an easy way to get choose-file-dialog to return a list of selected
> >files? Or do I need to write a dialog from scratch?
> >Thanks in advance,
> >Michael Young
> >Ohio State University
> The choose file dialog is not MCL's own but the standard
> one from the macintosh OS. So, you will have to write your
> Maybe someone already did the job...
This may do it. "(build-file-list nil)"
; Return a macintosh filename from an SFGETFILE dialog box.
(defun sf ()
(choose-file-dialog :button-string "Select")))
; Return a macintosh filename from an SFGETFILE dialog box (or nil if
(defun select-file-namestring ()
(let ((s (catch-cancel (sf))))
(if (eq s :cancel)
; Build a list of selected files.
(defun build-file-list (l)
(let ((s (select-file-namestring)))
(if (eq s nil)
(build-file-list (cons s l)))))