appscript
appscript copied to clipboard
objc: Make sendMode work.
- There are a few places that use
&&instead of&to mask bits out of sendMode, which doesn't actually mask out the bits. - Another place is missing parens, so it ends up comparing the last flag instead of the masked value.
- The net result is that changing the sendMode doesn't work in a variety of different cases.
I just realized that sendthreadsafe.c is copied into py-appscript and rb-appscript almost verbatim; the only changes are the filenames, the #include, and the name of the top-level function (e.g., AE_SendMessageThreadSafe vs. SendMessageThreadSafe).
And the Python and Ruby versions have the same bug, which I assume will make kAEWaitReply fail in the same way.
I'll try to find a way to test that, and then either replace this pull request with one that fixes all of the languages, or add a new one for the other languages.