• 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: Setting Finder comments and keywords
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting Finder comments and keywords


  • Subject: Re: Setting Finder comments and keywords
  • From: "Adam R. Maxwell" <email@hidden>
  • Date: Thu, 10 Jul 2008 19:18:11 -0700


On Jul 10, 2008, at 5:29 PM, Chris Idou wrote:

How does one programmatically change Finder comments and keywords?

I found this comment about MDItemSetAttribute...

[...]

The other suggestion I've seen is to send Apple events to the Finder to change these things. Since I'm writing a background application it seems terribly messy to be asking a foreground app to be doing stuff for me. Would it pop up the Finder window? That would be really ugly.

Any comments? Apple event code would be gratefully accepted if that is the only way.

You shouldn't have to resort to undocumented API. Look for setComment: in this file:


https://bibdesk.svn.sourceforge.net/svnroot/bibdesk/trunk/bibdesk/NSFileManager_BDSKExtensions.m

The implementation is based off of OmniAppKit and MoreAppleEvents; it's quite fast and does not activate the Finder, although it might cause problems for users that replace the Finder. It looks like all of the functions are in CoreServices, so should be safe for a background app.

--
Adam

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

References: 
 >Setting Finder comments and keywords (From: Chris Idou <email@hidden>)

  • Prev by Date: Setting DPI of image data
  • Next by Date: How do I copy a view?
  • Previous by thread: Setting Finder comments and keywords
  • Next by thread: JDBC Frameworks?
  • Index(es):
    • Date
    • Thread