• 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: Jim Correia <email@hidden>
  • Date: Thu, 7 Jun 2007 18:54:32 -0400

On Jun 7, 2007, at 6:50 PM, James Bucanek wrote:

I present a list of filenames obtained from the Finder. I want to present the list in the same order they would appear in the Finder. General advice for sorting arbitrary text in lists doesn't help.

If you want to do a numeric-sensitive sort, the built-on convenience comparators aren't going to help.


But you still need to do a localized sort if you are going to show data to users.

So, you can either do it the way that is outlined in the technote (taking advantage of the fact that NSString and CFString are toll free bridged), or you can use the

- (NSComparisonResult)compare:(NSString *)string options:(unsigned) mask range:(NSRange)compareRange locale:(NSDictionary *)dict;

which allows you to pass comparison options through.

Jim



_______________________________________________

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: James Bucanek <email@hidden>
References: 
 >Re: Sorting filenames the way the Finder does? (From: James Bucanek <email@hidden>)

  • Prev by Date: Re: Sorting filenames the way the Finder does?
  • Next by Date: RE: Key number to Unicode string (email@hidden)
  • 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