NSAppleEventDescriptor lacks essential functionality
||Date Originated:||07-Dec-2014 02:20 PM|
||Resolved:||Fixed in 10.11|
NSAppleEventDescriptor lacks several features essential to building and sending Apple events:
* no way to pack/unpack typeLongDateTime descriptors
* no way to pack typeProcessSerialNumber descriptors identifying the current process
* no way to check if an AEDesc is a record descriptor
* no way to send an AppleEvent.
Traditionally, developers could work around these omissions by using the original Carbon APIs, but as these APIs are now officially legacy or deprecated status, they are not a trustworthy foundation for new product development.
The attached patch contains five additional methods that address the above deficiencies:
While the patch has been implemented as a category (NSAppleEventDescriptor+AEDescExtensions), this was done for testing purposes only. I recommend inserting these methods directly into the NSAppleEventDescriptor class.
This code is taken from my existing AppleEventBridge project (https://bitbucket.org/hhas/appleeventbridge/), originally released under the BSD/MIT License but now released into the public domain. Apple is free to incorporate these five methods into its own codebase and place its own copyright upon them.
Note that this patch only provides modern replacements to five essential legacy/deprecated Carbon functions/types.
It does not define alternatives to existing Apple Event Manager-defined constants as there are hundreds of those. I'd recommend Apple ensures existing AE constants are fully supported and available to Cocoa developers as part of the NSAppleEventDescriptor-related APIs and documentation.
Reports posted here will not necessarily be seen by Apple.
All problems should be submitted at bugreport.apple.com before they are posted here.
Please only post information for Radars that you have filed yourself, and please do
not include Apple confidential information in your posts. Thank you!