[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mac Open file dialog
- To: firstname.lastname@example.org (Andrew Begel)
- Subject: Mac Open file dialog
- From: email@example.com (Steve Strassmann)
- Date: Thu, 21 Apr 1994 20:33:50 -0400
- Cc: info-mcl
>From: firstname.lastname@example.org (Andrew Begel)
>Subject: Mac Open file dialog
>Sender: email@example.com (USENET News System)
>Organization: MIT Media Laboratory
>Date: Fri, 22 Apr 1994 00:08:35 GMT
>I have a slight problem. In the docs for (open-file-dialog) it says that
>you can include a :mac-file-type parameter that will take a 4 char
>string (like "lisp", or "fasl") and restrict the directory entries in the open file dialog to those types. Has anyone ever used this feature? I've tried,
>and instead of showing "lisp" files (say) it just shows no files except for
>Can anyone tell me the syntax on how to use this command? The docs are wrong in the
>MCL 2.0 manual.
In the MCL 2.0 manual, page 327, this is documented as "an os-type parameter
or a list of os-type parameters". Basically, instead of passing a string,
pass a symbol:
(choose-file-dialog :mac-file-type :|FASL|)
Note that I use a keyword (prefix with :) to avoid package problems.
I also use vertical bars "|" because these operations are
case-sensitive, and symbols generally aren't.
Note that typical MCL source files have a mac-file-type of TEXT, not
"lisp". The "lisp" is the pathname's type, not the Finder type (which
you can use ResEdit to fiddle with).
? (choose-file-dialog :mac-file-type :|TEXT|)
#P"lug nuts:Desktop Folder:frimmox.lisp"
? (pathname-type #P"lug nuts:Desktop Folder:frimmox.lisp")
? (mac-file-type #P"lug nuts:Desktop Folder:frimmox.lisp")