• 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: Getting NSMetadataQuery to sort properly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Re: Getting NSMetadataQuery to sort properly (From: Chris Kane <email@hidden>)

  • Prev by Date: Re: How to make Fetched Property SELF constrinat?
  • Next by Date: Learning online Cocoa programming???
  • Previous by thread: Re: Getting NSMetadataQuery to sort properly
  • Next by thread: NSTableView CheckBoxes & selection
  • Index(es):
    • Date
    • Thread