AppleEvent Manager does not respect the kAEDontExecute flag of NSAppleEventDescriptor.SendOptions:
This is FB21695413:
My AppleScriptable macOS app is recordable. Occasionally, I have a UI action performed by the user that I handle internally, and I send a corresponding AppleEvent with the SendOptions flag .dontExecute (was kAEDontExecute) so that AppleScript recording will see the action and record it.
With Sequoia 15.7.3 and Tahoe 26.1, I am seeing events sent with the .dontExecute flag delivered back to the application invoking the appropriate AppleEvent handler AS IF the .dontExecute flag was not specified.
For example, if in my app the user does an action to create a new ‘widget’, I send an apple event of the form
make new widget at end of document 1
with the .dontExecute option, but, the AppleEvent handler installed for core/crel gets called anyway, and as a result, 2 widgets get made.
I expect (and previously the behavior was) that if I specify .dontExecute, the AppleEvent will be forwarded to any registered recording agents, but not actually delivered to the app itself.
For the expected behavior, see Inside Macintosh: Interapplication Communication / Chapter 9 - Recording Apple Events / Factoring Your Application for Recording “Sending Apple Events Without Executing Them”