How does one programmatically change Finder comments and keywords?

I found this comment about MDItemSetAttribute...

http://www.cocoadev.com/index.pl?SpotlightAndTagging

which seems to say that if you use MDItemSetAttribute the changes will get 
blown away on a spotlight rebuild. I could understand attributes getting blown 
away that are derived from the file itself, but since Finder comments and 
keywords are not normally added by the spotlight indexer, it doesn't make much 
sense to me that rebuilding would blow them away. Still, if rebuilding blows 
away normal Finder comments I don't care. I just don't want what I do 
programmatically to be any "worse" than what would be done by the Finder itself.

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.





      
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to