Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sorting an NSArray



not sure what's going on, but i never saw the email containing "the docs mmalcolm pointed out" - can someone forward me the email?

Cheers.

On 30/06/2005, at 6:53 PM, j o a r wrote:


On 30 jun 2005, at 10.46, Andy Lee wrote:


Oops, that isn't right. The selector you pass is supposed to be a comparison method, which is not what -name is. What you should do is write a comparison method in your object class, and pass the selector for that method.


Stop to think if you really need to write a custom comparison method - it's probably only necessary if you need to compare non- object values or perform a compound comparison between several attributes. The question asked in the first message in this thread didn't give that impression.



It's probably clearer if you check out the docs mmalcolm pointed to.


Agreed!

j o a r






Duncan Campbell ===================== http://www.duncanandsarah.com


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Sorting an NSArray (From: Duncan Campbell <email@hidden>)
 >Re: Sorting an NSArray (From: Andy Lee <email@hidden>)
 >Re: Sorting an NSArray (From: Andy Lee <email@hidden>)
 >Re: Sorting an NSArray (From: j o a r <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.