Sorting MutableArrays
Sorting MutableArrays
- Subject: Sorting MutableArrays
- From: John H Moody <email@hidden>
- Date: Thu, 07 Feb 2002 22:55:42 -0800
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.