Re: Object Specifier pasteboard type
Re: Object Specifier pasteboard type
- Subject: Re: Object Specifier pasteboard type
- From: Bryan Prusha <email@hidden>
- Date: Thu, 12 May 2005 11:51:42 -0700
On May 11, 2005, at 5:46 PM, Mark Alldritt wrote: If there's a system pasteboard type that doesn't have a Cocoa name, then you can use it in Cocoa anyway by naming it "CorePasteboardFlavorType 0x" followed by the four-letter identifier written in hexadecimal. So 'obj ' would become "CorePasteboardFlavorType 0x6F626A20".
Thanks very much for this information. This worked in so much as it allows me to read my Carbon app's scrap in Cocoa which is a big step forward. However, it seems that the Script Editor is looking for some other pasteboard type in order to activate its Paste Reference command.
I highly recommend avoiding use of CorePasteboardFlavorTypes. They were a necessary hack to get Carbon Scrap and Drag to work with the lower level pasteboard mechanism and should never have been exported on the Cocoa side. The underlying implementation has been converted to Uniform Type Identifiers (UTIs, <LaunchServices/UTType.h>). CorePasteboardFlavorTypes are deprecated and we only continue to export them in the Cocoa Pasteboard for binary compatibility. Because UTIs are now used under the sheets I would recommend adding an imported UTI declaration in your info.plist. Add the 'obj ' OSType and NSPasteboardType of your choosing. In your implementation, simply refer to your custom NSPasteboardType and the OSType will be automagically converted for you. I believe this is supported in Panther and later, definitely in Tiger. |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden