• 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: Sorting Attributed Strings w/Bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sorting Attributed Strings w/Bindings


  • Subject: Re: Sorting Attributed Strings w/Bindings
  • From: Marcel Weiher <email@hidden>
  • Date: Sun, 21 Nov 2004 10:44:43 +0000


On 21 Nov 2004, at 04:20, Ian G. Gillespie wrote:

I tried adding a compare: category to NSAttributedString, but then I
got this error:
-[NSConcreteAttributedString _fastCharacterContents]: selector not
recognized


How did you implement 'compare'?


Thanks for replying. I added this a method like this as a category to NSAttributedString. It gets called when I click the table column.

-(NSComparisonResult)compare:(NSAttributedString *)str  {
    NSString *us = [self string];
    NSString *other = [str string];
    return [us caseInsensitiveCompare:str];
}


Typo-time! Try:

    return [us caseInsensitiveCompare:other];

instead...

Marcel


_______________________________________________ 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
References: 
 >Re: Sorting Attributed Strings w/Bindings (From: "Ian G. Gillespie" <email@hidden>)

  • Prev by Date: Keyed archiver
  • Next by Date: Re: cocoa java bridge: converting nsarray to java array
  • Previous by thread: Re: Sorting Attributed Strings w/Bindings
  • Next by thread: Re: Purify?
  • Index(es):
    • Date
    • Thread