• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Sorting MutableArrays
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Sorting MutableArrays
      • From: Sam Goldman <email@hidden>
  • Prev by Date: Quick Request
  • Next by Date: Re: Sorting MutableArrays
  • Previous by thread: Re: Quick Request
  • Next by thread: Re: Sorting MutableArrays
  • Index(es):
    • Date
    • Thread