suppress an error message (related to Mac 10.7)

We could try to figure out the current state of the process,
instead, but it seems like too much work.

original commit: 9c5b78e998c7cf3e6a0bfe9848b7a47f18562ef3
This commit is contained in:
Matthew Flatt 2011-09-09 19:22:42 -06:00
parent fee465a5a4
commit 480477cbd4

View File

@ -108,7 +108,12 @@
-> _OSStatus))
(let ([v (TransformProcessType (make-ProcessSerialNumber 0 kCurrentProcess)
kProcessTransformToForegroundApplication)])
(unless (zero? v)
(unless (or (zero? v)
;; As of Mac OS X 10.7, TransformProcessType() complains
;; if the application is already a foreground application,
;; so just ignore that error (even though it correctly flagged
;; a bug in the `_ProcessSerialNumber' definition at one point).
(= v -50))
(log-error (format "error from TransformProcessType: ~a" v))))
(define app-delegate (tell (tell MyApplicationDelegate alloc) init))