cocoa: avoid another 10.6-only method
Closes PR 11442
This commit is contained in:
parent
2a3c66b731
commit
bf9b913f33
|
@ -57,11 +57,14 @@
|
||||||
(when message
|
(when message
|
||||||
(tellv ns setMessage: #:type _NSString message))
|
(tellv ns setMessage: #:type _NSString message))
|
||||||
(when directory
|
(when directory
|
||||||
(tellv ns setDirectoryURL: (tell NSURL
|
(let ([dir (if (string? directory)
|
||||||
fileURLWithPath: #:type _NSString (if (string? directory)
|
|
||||||
directory
|
directory
|
||||||
(path->string directory))
|
(path->string directory))])
|
||||||
isDirectory: #:type _BOOL #t)))
|
(if (version-10.6-or-later?)
|
||||||
|
(tellv ns setDirectoryURL: (tell NSURL
|
||||||
|
fileURLWithPath: #:type _NSString dir
|
||||||
|
isDirectory: #:type _BOOL #t))
|
||||||
|
(tellv ns setDirectory: #:type _NSString dir))))
|
||||||
(when filename
|
(when filename
|
||||||
(tellv ns setNameFieldStringValue: #:type _NSString (path->string
|
(tellv ns setNameFieldStringValue: #:type _NSString (path->string
|
||||||
(file-name-from-path filename))))
|
(file-name-from-path filename))))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user