Re: Wisdom of overriding isEqual:
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.