• 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
Newbie-Question: Sorting Arrays
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie-Question: Sorting Arrays


  • Subject: Newbie-Question: Sorting Arrays
  • From: "Christoph Lauterbach" <email@hidden>
  • Date: Fri, 10 Jun 2005 15:07:49 +0200 (MEST)

Hi,

I am a newbie to Cocoa, so please be appreciative for my question:

I have an mutable array with objects with contain among others a NSDate
object and a NSString object.

I want to sort the array in ascending order by the NSDate object and
secondly by the NSString object.

I found the
sortUsingFunction:context:

and the

sortUsingSelector:

function in NSMutableArray, but the are a bit cryptic to me. Maybe one of
you talented guys can give me an example how to sort the array with these
functions.

I still work with MacOS X 10.2, so the NSSortDescriptor isn't available
for me.

Thank you very much
Christoph Lauterbach
Lindau/Lake of Constance, Germany

--
Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie!
Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Newbie-Question: Sorting Arrays
      • From: Andreas Mayer <email@hidden>
    • Re: Newbie-Question: Sorting Arrays
      • From: Pontus Ilbring <email@hidden>
  • Prev by Date: More than one externally initialised object in a nib?
  • Next by Date: Thumbnail from QT Movie?
  • Previous by thread: Re: More than one externally initialised object in a nib?
  • Next by thread: Re: Newbie-Question: Sorting Arrays
  • Index(es):
    • Date
    • Thread