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: James Bucanek <email@hidden>
- Date: Thu, 7 Jun 2007 23:06:53 -0700
Jim Correia <mailto:email@hidden> wrote (Thursday, June
7, 2007 3:54 PM -0400):
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.
Could you clarify the statement "pass comparison options
through?" Are you saying it's possible to pass the options
listed in the tech note 1159 to compare:options:? The options
documented for compare:options: are limited to
NSCaseInsensitiveSearch, NSLiteralSearch, and NSNumericSearch.
It doesn't appear that these would match the laundry list of
options that tech note 1159 suggests passing to UCCompareTextDefault().
It would be slightly more convenient, and possibly more
efficient, if I could compare the NSString objects directly. But
creating a catagory of NSString, extracting the Unicode, and
comparing using UCCompareTextDefault() isn't a strain either.
--
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