• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Accessing a file "comment"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Accessing a file "comment" (From: mail4 <email@hidden>)
 >Re: Accessing a file "comment" (From: Wade Tregaskis <email@hidden>)

  • Prev by Date: Re: Accessing a file "comment"
  • Next by Date: Trouble editing a custom NSCell
  • Previous by thread: Re: Accessing a file "comment"
  • Next by thread: C++Lib in objective-C
  • Index(es):
    • Date
    • Thread