appscript icon indicating copy to clipboard operation
appscript copied to clipboard

objc: Make sendMode work.

Open abarnert opened this issue 13 years ago • 1 comments

  • 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.

abarnert avatar Oct 05 '12 21:10 abarnert

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.

abarnert avatar Oct 05 '12 23:10 abarnert