Re: Accessing a file "comment"
Re: Accessing a file "comment"
- Subject: Re: Accessing a file "comment"
- From: Frederick Cheung <email@hidden>
- Date: Wed, 24 Nov 2004 09:49:12 +0000
On 24 Nov 2004, at 08:47, Wade Tregaskis wrote:
Using the finder, one can give a file a unique comment.
Yet, nothing in cocoa seems to allow one to access/change this
attribute.
Yes, there is no way to access or modify Finder info from Cocoa, or
even directly via Carbon. If you dig hard enough, you dig up a few
choice examples like
<http://developer.apple.com/samplecode/MoreFiles/listing24.html> - see
the DTGetComment function, in particular. At a glance it looks like
you have to obtain the comment ID from the extended file info (which
can be done using Carbon File Manager calls) and then look that up
manually in the desktop database file - i.e. a completely gross
solution, but apparently the only one.
The desktop database routines allow you to set the mac os 9 file/folder
comments (which were accessible via the Carbon APIs), however this is
not used by the OS X finder. You need to send appleevents to the finder
(see http://developer.apple.com/samplecode/MoreIsBetter/listing16.html)
Fred
_______________________________________________
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