better file-extension support for Mac OS X put-file dialog

svn: r12638

original commit: 7f4ddbe5fa8d9d604dccc3fe3c96450497579245
This commit is contained in:
Matthew Flatt 2008-11-29 18:52:25 +00:00
parent 2372874c40
commit 2d0a0481b4

View File

@ -118,22 +118,24 @@ Under Windows, if @scheme[extension] is not @scheme[#f], the returned path
is @scheme[(string-append "*." extension)], then the result pathname is guaranteed is @scheme[(string-append "*." extension)], then the result pathname is guaranteed
to have an extension mapping @scheme[extension]. to have an extension mapping @scheme[extension].
Under Mac OS X, if @scheme[extension] is not @scheme[#f] Under Mac OS X, if @scheme[extension] is not @scheme[#f], the returned
and @scheme[filters] contains the single path will get a default extension if the user does not supply one.
pattern @scheme[(string-append "*." extension)], then the result pathname is If @scheme[filters] contains as @scheme["*.*"] pattern, then the user
guaranteed to have an extension mapping @scheme[extension]. Otherwise, can supply any extension that is recognized by the system; otherwise,
@scheme[extension] and @scheme[filters] are ignored. the extension on the returned path will be either @scheme[extension]
or @scheme[_other-extension] for any @scheme[(string-append "*."
_other-extension)] pattern in @scheme[filters]. In particular, if the
only pattern in @scheme[filters] is empty or contains only
@scheme[(string-append "*." extension)], then the result pathname is
guaranteed to have an extension mapping @scheme[extension].
The @scheme[extension] argument is ignored under X, and @scheme[filters] The @scheme[extension] argument is ignored under X, and
can be used to specify glob-patterns. @scheme[filters] can be used to specify glob-patterns.
The @scheme[style] list is treated as for The @scheme[style] list is treated as for @scheme[get-file].
@scheme[get-file].
See also @scheme[path-dialog%]. See also @scheme[path-dialog%].
} }
@defproc[(get-directory [message (or/c string? false/c) #f] @defproc[(get-directory [message (or/c string? false/c) #f]