Re: Sorting filenames the way the Finder does?
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