cocoa: fix save-file dialog when other extensions should be allowed

original commit: 83bcdbbd8122c688f02685d212daa621b86a6174
This commit is contained in:
Matthew Flatt 2010-11-08 07:12:03 -07:00
parent 1a852b22ed
commit dceffd7fee

View File

@ -42,10 +42,10 @@
arrayWithObjects: #:type (_list i _NSString) extensions
count: #:type _NSUInteger (length extensions))])
(tellv ns setAllowedFileTypes: a))))
(when (not (ormap (lambda (e)
(equal? (cadr e) "*.*"))
filters))
(tellv ns setAllowsOtherFileTypes: #:type _BOOL #f))
(let ([others? (ormap (lambda (e)
(equal? (cadr e) "*.*"))
filters)])
(tellv ns setAllowsOtherFileTypes: #:type _BOOL others?))
(cond
[(memq 'multi style)