Re: [Q] How will the Pasteboard manager be changed?
Re: [Q] How will the Pasteboard manager be changed?
- Subject: Re: [Q] How will the Pasteboard manager be changed?
- From: JongAm Park <email@hidden>
- Date: Fri, 19 Dec 2008 15:59:59 -0800
Thanks for your comment.
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.
There are only two functions in the AppKit for making file type specific
Pboard : NSCreateFileContentsPboardType() and NSCreateFilenamePboardType().
Although NSFilenamesPboardType yield 'fURL' and 'hfs' flavors, using
returned string by calling NSCreateFileContentsPboardType() doesn't
generate any flavors. So, I had to find a way to generate the 'hfs'
using the Cocoa, but I guess I need to use Carbon functions.
By the way, can the Pasteboard type and NSPasteboard be intermixed like
CFStringRef and NSString?
Thanks,
JongAm Park
Jim Correia wrote:
On Dec 19, 2008, at 5:39 PM, JongAm Park wrote:
So, can anyone tell me how the Carbon's pasteboard manager will
change, and why Cocoa's pasteboard manager doesn't reveal some
methods which handles flavors easily? Probably flavors are being
deprecated also? ( Although there should be some similar mechanism.. )
The preferred, mechanism independent way, to describe types on Mac OS
X is to describe them via a Uniform Type Identifier (UTI).
Most places in AppKit should transparently support UTIs on 10.5 and
later. If you need to interact with the pasteboard on earlier
releases, you'll have to drop down to the procedural API in Pasteboard.h.
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.
Jim
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden