Re: Sorting MutableArrays
Re: Sorting MutableArrays
- Subject: Re: Sorting MutableArrays
- From: Sam Goldman <email@hidden>
- Date: Thu, 07 Feb 2002 23:11:01 -0800
John,
Check the archives (mamasam) for "kCFCompareNumerically". Steve Gehrman
posted a little while ago trying to get the *best* way to sort for his SNAX
application. Some very talented programmers created an excellent piece of
code to sort alphabetically and numerically.
- Sam
On 2/7/02 10:55 PM, "John H Moody" <email@hidden> wrote:
>
I checked the archives first, so my apologies if this has recently been
>
covered.
>
>
My app connects to OpenBase and loads records into custom objects which are
>
in turn loaded into an NSMutableArray. The NSMutableArray is my datasource
>
for an NSTableView. I'd like to ascend-alphabetize the rows in the
>
NSTableView based on the lastName and firstName instance variables contained
>
within my custom objects within my NSMutableArray.
>
>
Is the best approach to sort my NSMutableArray using the method
>
-sortUsingFunction:Context or is there a way to alphabetize the NSTableView
>
as opposed to its datasource?
>
>
If -sortUsingFunction:Context is the best solution, could someone kindly
>
give me an example of what it might look like?
>
>
Thank you greatly,
>
>
John Moody
>
email@hidden
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
--
Windows is a 32-bit patch to a 16-bit shell for an 8-bit operating system
written for a 4-bit processor by a 2-bit company without 1 bit of sense.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.