On Dec 19, 2008, at 6:59 PM, JongAm Park wrote:

Although the AppKit supports UTIs, but I couldn't find a way to generate pasteboard type for 'hfs'.
So, probably for this, I think Carbon functions should be used.

I previously offered a solution for this problem. I wrote:

        If you have a four char code that you need to represent as a UTI, you
        can do the conversion using the functions in UTType.h.

These are neither Carbon nor Cocoa functions, but part of the Launch Services framework/API.

Among other things, this API set lets you convert between UTI, filename extension, mime type, four character code, and NSPasteboard type.

UTTypeCreatePreferredIdentifierForTag is where you should start. (But familiarizing yourself with, and understanding, the API in that header will be beneficial if you find yourself needed to convert between UTI and the various tag classes.)

By the way, can the Pasteboard type and NSPasteboard be intermixed like CFStringRef and NSString?

No. They are not toll-free bridged.

Jim
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to