Re: Getting NSMetadataQuery to sort properly
Re: Getting NSMetadataQuery to sort properly
- Subject: Re: Getting NSMetadataQuery to sort properly
- From: Scott Anguish <email@hidden>
- Date: Tue, 5 Jul 2005 06:52:53 -0400
On Jul 4, 2005, at 9:31 PM, Chris Kane wrote:
On Jun 27, 2005, at 6:30 PM, Tom Birch wrote:
On 28/06/2005, at 03:00:20, Corbin Dunn wrote:
[[NSSortDescriptor alloc] initWithKey:@"kMDItemPath"
ascending:YES]
Try using kMDItemFSName
Hmmm, I tried and it sorted correctly by name, but unfortunately
that's a non-solution for me as I'm using the full path as the key
used to merge known pdf's and ones found by spotlight, so I really
need to sort by kMDItemPath
I wonder if this anything to do with the fact that [NSMetadataItem
-attributes] shows an array that doesn't actually contain
"kMDItemPath" yet it's a perfectly valid attribute
Tom
I seem to recall something about kMDItemPath being "special"
because it is very expensive to compute. But it seems like it
should be computed if you ask for it in the query (as a sort
attribute for example) even though it will slow things down.
Probably worth a bug if you haven't already; there should be some
headerdoc or other doc if there is indeed special behavior for that
attribute, if nothing else.
Chris is right, it is special, and you can't sort on it. This
isn't currently documented, but will be shortly.
_______________________________________________
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