Drag&Drop Programming 2 : Difference between Cocoa app and Carbon app

Silently there has been lots of discussion for a Finder written with Cocoa.
Why do people want a Cocoafied Finder? Was there restriction for using a Mac? No.
I guess people just thought that Carbon was old and they want something new.

However, the Finder is very complicated program. It is a kind of bridge among the OS and other programs, file system, and so on. So, it should do lots of transparent chores. So, touching the Finder for updating is quite big thing.
My personal opinion is, “If it works well, just let it as it is.”
However Apple Inc. would want one framework strategy for reducing cost for maintenance and salary.

Anyway, this time I would like to show some difference between Cocoa app and Carbon app.

First, let’s take a look at a difference of information generated for Drag&Drop.


The one on the left is from the Finder. When a QuickTime movie file is dragged, the Finder exports information shown on the left.

The one on the right is from my program using NSFilenamesPboardType. The NSFilenamesPboardType automatically exports the ‘fURL’ and the ‘hfs’ flavors. However, the ‘hfs’ data from my program doesn’t contain file type information of the chosen QuickTime file.
Strangely, if I use NSURLPboardType, and when even declareType… method is called, it doesn’t exports the ‘fURL’ flavor.

So, I tried calling NSCreateFilenamePboardType(@”mov”), hoping that it would generate ‘hfs’ flavor with MooV file type in its data part. However, using an NSString string obtained by calling the NSCreateFilenamePboardType(@”mov”) doesn’t generate any flavor, even ‘fURL’ and ‘hfs’.
So, I think this is a bug around NSCreateFilenamePboardType() mechanism.

So, for this part, I guess I need to write with Carbon. But I doubt if it is worth while to doing so. Anyway, Apple Inc is retiring Carbon gradually and finally it it is almost the time to give up using Carbon calls.

According to recent News, the Snow Leopard is said to have a partially Cocoafied Finder.
Because the Finder is in the center of almost of all file related operation, Cocoafied Finder means that lots of file related scenario is facing inevitable changes.
Anyway, I hope it would simplify programming really.


One response to this post.

  1. […] 2 01 2009 Information mentioned before, especially in a post, Drag&Drop Programming 2 : Difference between Cocoa app and Carbon app, is not explained in Apple’s […]


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: