Re: MDItemCopyAttribute and kMDItemFinderComment

2009-04-22 Thread Alastair Houghton
On 22 Apr 2009, at 04:30, Jeremy W. Sherman wrote: getxattr(2) will directly access the current on-disk attribute value. Why not just use it as Alastair suggested? I suppose it is worth mentioning that getxattr() won't work as a way of getting the Finder information if the drive you're usi

Re: MDItemCopyAttribute and kMDItemFinderComment

2009-04-21 Thread Jeremy W. Sherman
> > Can you point to any official documentation for the Finder comment xattr > name? > No, I cannot, beyond a support article which relies on the fact ( http://support.apple.com/kb/TA25203?viewlocale=en_US). I don't really want to be sending apple events to the finder since this is > a background

Re: MDItemCopyAttribute and kMDItemFinderComment

2009-04-21 Thread Adam R. Maxwell
On Apr 21, 2009, at 8:30 PM, Jeremy W. Sherman wrote: getxattr(2) will directly access the current on-disk attribute value. Why not just use it as Alastair suggested? Can you point to any official documentation for the Finder comment xattr name? The storage for it has changed before, so

Re: MDItemCopyAttribute and kMDItemFinderComment

2009-04-21 Thread Jeremy W. Sherman
getxattr(2) will directly access the current on-disk attribute value. Why not just use it as Alastair suggested? —Jeremy On Tue, Apr 21, 2009 at 8:16 PM, Chris Idou wrote: > > > I don't really want to be sending apple events to the finder since this is > a background app, and it could be callin

Re: MDItemCopyAttribute and kMDItemFinderComment

2009-04-21 Thread Chris Idou
I don't really want to be sending apple events to the finder since this is a background app, and it could be calling it fairly frequently, and I believe this can impact the user's foreground use of Finder. Does anybody know what the issue is? Mostly the synchronization between Finder Comments

Re: MDItemCopyAttribute and kMDItemFinderComment

2009-04-21 Thread Michael Tsai
On Apr 21, 2009, at 8:04 AM, Chris Idou wrote: I've got a program which uses MDItemCopyAttribute to get the kMDItemFinderComment, and I was playing around testing it, by changing the value in the Finder and seeing if the value changed in my program, and they ended up out of synch. It ends up

[OT] Re: MDItemCopyAttribute and kMDItemFinderComment

2009-04-21 Thread Alastair Houghton
On 21 Apr 2009, at 13:04, Chris Idou wrote: I've got a program which uses MDItemCopyAttribute to get the kMDItemFinderComment, and I was playing around testing it, by changing the value in the Finder and seeing if the value changed in my program, and they ended up out of synch. It ends up tha

MDItemCopyAttribute and kMDItemFinderComment

2009-04-21 Thread Chris Idou
I've got a program which uses MDItemCopyAttribute to get the kMDItemFinderComment, and I was playing around testing it, by changing the value in the Finder and seeing if the value changed in my program, and they ended up out of synch. It ends up that mdls returns a different value than xattr -