• 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: Sorting filenames the way the Finder does?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sorting filenames the way the Finder does?


  • Subject: Re: Sorting filenames the way the Finder does?
  • From: James Bucanek <email@hidden>
  • Date: Thu, 7 Jun 2007 15:29:01 -0700

Scott Anguish <mailto:email@hidden> wrote (Thursday, June 7, 2007 2:48 PM -0400):

gah.. actually, that's way more work than you need for displaying to the user.

here is a message from Deborah posted here recently

http://www.cocoabuilder.com/archive/message/cocoa/2007/4/13/181880

Are you sure that's the right post?

That post doesn't say anything about sorting order, only how to call the sort function of an NSArray.

If the suggestion is to use localizedCompare: or localizedCaseInsensitiveCompare:, then the answer is wrong. That's clearly not the (only) sorting rules used by the Finder. For one thing, the Finder sorts numeric substrings as integer values -- localizedCompare: and localizedCaseInsensitiveCompare: don't.

Now if there's some magic set of options that one could pass to -[NSString compare:options:] that would sort the same way the Finder does, I'm all ears.

--
James Bucanek

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Sorting filenames the way the Finder does?
      • From: Scott Anguish <email@hidden>
References: 
 >Re: Sorting filenames the way the Finder does? (From: Scott Anguish <email@hidden>)

  • Prev by Date: Array controller content vs. contentArray binding
  • Next by Date: Re: codeSense
  • Previous by thread: Re: Sorting filenames the way the Finder does?
  • Next by thread: Re: Sorting filenames the way the Finder does?
  • Index(es):
    • Date
    • Thread