On Fri, Jun 6, 2008 at 6:53 PM, Adam R. Maxwell <[EMAIL PROTECTED]> wrote:
> So for an array of NSNumbers you could use -description and a
> -numericCompare: method that uses NSNumericSearch. In my opinion, it makes
> more sense to use -self and -compare: for NSDate/NSNumber.
To me, option 1 onl
On Jun 6, 2008, at 2:51 PM, Ken Thomases wrote:
On Jun 6, 2008, at 4:16 PM, Adam R. Maxwell wrote:
On Friday, June 06, 2008, at 02:07PM, "George Stuart" <[EMAIL PROTECTED]
> wrote:
The suggestion of using a keyPath of @"self" presents another
question:
1) I assume NSSortDescriptor is us
On Jun 6, 2008, at 4:16 PM, Adam R. Maxwell wrote:
On Friday, June 06, 2008, at 02:07PM, "George Stuart" <[EMAIL PROTECTED]
> wrote:
The suggestion of using a keyPath of @"self" presents another
question:
1) I assume NSSortDescriptor is using valueForKeyPath:, which in
turns calls valueFor
On Friday, June 06, 2008, at 02:07PM, "George Stuart" <[EMAIL PROTECTED]> wrote:
>The suggestion of using a keyPath of @"self" presents another question:
>1) I assume NSSortDescriptor is using valueForKeyPath:, which in
>turns calls valueForKey: some number of times, to get the object for
>
On Jun 6, 2008, at 2:26 PM, Andrew Merenbach wrote:
Quoting Ken Thomases <[EMAIL PROTECTED]>:
On Jun 6, 2008, at 3:43 AM, George Stuart wrote:
NSSortDescriptor *desc = [[NSSortDescriptor alloc]
initWithKey:nil ascending:NO
selector:@selector(localizedCompare:)];
NSArray *sortedArray = [u
Quoting Ken Thomases <[EMAIL PROTECTED]>:
On Jun 6, 2008, at 3:43 AM, George Stuart wrote:
NSSortDescriptor *desc = [[NSSortDescriptor alloc] initWithKey:nil
ascending:NO selector:@selector(localizedCompare:)];
NSArray *sortedArray = [unsortedArray
sortedArrayUsingDescriptors:[NSArray arr
On Jun 6, 2008, at 3:43 AM, George Stuart wrote:
NSSortDescriptor *desc = [[NSSortDescriptor alloc] initWithKey:nil
ascending:NO selector:@selector(localizedCompare:)];
NSArray *sortedArray = [unsortedArray sortedArrayUsingDescriptors:
[NSArray arrayWithObject:desc]];
[desc release];
That se
So I searched through the cocoabuilder.com threads on array sorting to
see what had been discussed regarding this topic. My goal is to
reverse alphabetically sort an array of NSString objects. I saw a
couple suggestions:
1. Categories to add funcationality to NSString and then use the