• 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
Re: - (void)sortUsingSelector:(SEL)comparator
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: - (void)sortUsingSelector:(SEL)comparator


  • Subject: Re: - (void)sortUsingSelector:(SEL)comparator
  • From: peter mysliwy <email@hidden>
  • Date: Wed, 25 Jul 2001 14:17:51 -0400

On Wednesday, July 25, 2001, at 01:35 PM, Stiphane Sudre wrote:

> On mercredi, juillet 25, 2001, at 06:48 PM, peter mysliwy wrote:
>
>> Hello;
>> I am new to apple and ObjectiveC and started by playing around with
>> NSArray and NSMutableArray to learn something about the native
>> datatypes.
>>
>> The question I have How do I sort a NSArray using
>> - (void)sortUsingSelector:(SEL)comparator
>>
>> What does (SEL)comparator mean??
>
>
> Sorting the array will be then done with this code:
>
> [myArray sortUsingSelector:@selector(compareInsensitive:)];
> _______________________________________________


Shouldn't this be [myArray
sortUsingSelector:@selector(caseInsensitiveCompare:)];
I tried this and it works I will try your other in a while.

Is their any docs on @selector? You've pointed me in the right direction
of searching the
.h file of the type that I am using for the comparison

peter


  • Follow-Ups:
    • Re: - (void)sortUsingSelector:(SEL)comparator
      • From: Art Isbell <email@hidden>
    • Re: - (void)sortUsingSelector:(SEL)comparator
      • From: Finlay Dobbie <email@hidden>
References: 
 >Re: - (void)sortUsingSelector:(SEL)comparator (From: Stéphane Sudre <email@hidden>)

  • Prev by Date: Re: - (void)sortUsingSelector:(SEL)comparator
  • Next by Date: Re: Obj-C vs Java
  • Previous by thread: Re: - (void)sortUsingSelector:(SEL)comparator
  • Next by thread: Re: - (void)sortUsingSelector:(SEL)comparator
  • Index(es):
    • Date
    • Thread