• 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: Chris Kane <email@hidden>
  • Date: Mon, 4 Jul 2005 18:31:48 -0700


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 Kane Cocoa Frameworks, Apple


_______________________________________________ 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
  • Follow-Ups:
    • Re: Getting NSMetadataQuery to sort properly
      • From: Scott Anguish <email@hidden>
  • Prev by Date: Re: Cocoa Globe/ShapeFile Library?
  • Next by Date: NSTableView CheckBoxes & selection
  • Previous by thread: Re: table binding/core data
  • Next by thread: Re: Getting NSMetadataQuery to sort properly
  • Index(es):
    • Date
    • Thread