• 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: Wisdom of overriding isEqual:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wisdom of overriding isEqual:


  • Subject: Re: Wisdom of overriding isEqual:
  • From: Patrick Machielse <email@hidden>
  • Date: Wed, 10 Mar 2004 21:52:56 +0100

op 10-03-2004 14:18 schreef j o a r

> On 2004-03-10, at 13.33, Patrick Machielse wrote:
>
>> 2) No standard Cocoa class overrides isEqual:, at least the
>> documentation is
>> silent on this.
>
> Lots of classes override isEqual. NSString for example.

Where and how? There is no mention of this in the documentation of NSString.
NSString provides isEqualToString:, but that is not an override of course.
And doesn't get called by NSSet et al. (at all)

The documentation of isEqualToString: does _seem to indicate_ that isEqual:
will compare the contents of two strings. Why then isn't this in the
documentation?

Overriden methods should be documented!

> If you use a category to a Cocoa class you might override a built in
> implementation of isEqual. It's unlikely, but possible, that this would
> interfere with the normal operations of that class.

OK. This is as I thought: only override isEqual: for my own classes...

Groeten,

Patrick
--
Hieper Software

w: www.hieper.nl
e: 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: Wisdom of overriding isEqual:
      • From: Wade Tregaskis <email@hidden>
References: 
 >Re: Wisdom of overriding isEqual: (From: j o a r <email@hidden>)

  • Prev by Date: Re: Advice needed about a possible bug in NSMethodSignature or NSInvocation
  • Next by Date: Re: Wisdom of overriding isEqual:
  • Previous by thread: Re: Wisdom of overriding isEqual:
  • Next by thread: Re: Wisdom of overriding isEqual:
  • Index(es):
    • Date
    • Thread