Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ScrapMgr/Pasteboard data interoperability questions




On May 27, 2008, at 5:12 PM, Bryan Prusha wrote:

Yes, exporting a UTI for your proprietary OSType in your Info.plist will allow you to work with Pasteboard/UTI in the newer version of your application and communicate to Scrap/OSType in the old version. Alternately, instead of publicizing your proprietary pasteboard types you could create a dynamic UTI directly from your OSType using the APIs in LaunchServices/UTType.h. The dynamic UTI be appropriately "downsampled" for Scrap consumption in your old app. As for PDF, adding the data via Scrap or Pasteboard is exactly the same it's just a matter of using 'PDF ' or "com.adobe.pdf" as appropriate for the API. I definitely recommend updating to Pasteboard for it's flexibility and descriptiveness. If you must interact with apps that only deal in 'TEXT' then yes, add the same data you would have with Scrap but use the "com.apple.traditional- mac-plain-text" UTI instead. There are no default translations to or from 'TEXT'. The UTI and OSType are firmly bound in the OS so you don't need to export any kind of a declaration there.

Thanks for the comprehensive and lucid explanation, Bryan.

Moving forward, of course, aiming for Unicode or UTF-8 support is highly recommended.

With your advice above, everything works perfectly. I'm using Pasteboard API consistently, Unicode as my primary export text, and write both a shadow 8-bit copy in com.apple.traditional-mac-plain-text and a .plist-declared proprietary UTI with OSType declaration to gain interoperability with older ScrapMgr clients like Word (for text) and previous generations of my own app (for the proprietary data).


Thanks,
Nick


_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >ScrapMgr/Pasteboard data interoperability questions (From: Nick Jackiw <email@hidden>)
 >Re: ScrapMgr/Pasteboard data interoperability questions (From: Bryan Prusha <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.