Re: -[NSMutableSet addObject:] Ambiguous Docs: -isEqual: vs. ==

2008-10-16 Thread Keith Duncan
adding duplicates based on -isEqual: ^is^ indeed the behavior that I want You might take a look at NSCountedSet, which doesn't add the object again but bumps the count. Keith ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not p

Re: -[NSMutableSet addObject:] Ambiguous Docs: -isEqual: vs. ==

2008-10-15 Thread Jerry Krinock
Sorry, a correction: adding duplicates based on -isEqual: ^is^ indeed the behavior that I want ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at c

Re: -[NSMutableSet addObject:] Ambiguous Docs: -isEqual: vs. ==

2008-10-15 Thread Jerry Krinock
On 2008 Oct, 15, at 17:03, Nick Zitzmann wrote: Yes, NSSet and its subclasses use -isEqual:. You should override that, as well as -hash. Thanks, Nick. I don't think I need to override anything though, because not adding duplicates based on -isEqual: is indeed the behavior that I want.

Re: -[NSMutableSet addObject:] Ambiguous Docs: -isEqual: vs. ==

2008-10-15 Thread Nick Zitzmann
On Oct 15, 2008, at 5:45 PM, Jerry Krinock wrote: I am assuming therefore assuming "-isEqual:" in writing my code. Someone please let me know if they see any risk in that. Yes, NSSet and its subclasses use -isEqual:. You should override that, as well as -hash. Nick Zitzmann

-[NSMutableSet addObject:] Ambiguous Docs: -isEqual: vs. ==

2008-10-15 Thread Jerry Krinock
Documentation for -[NSMutableSet addObject:] says: "Adds a given object to the receiver, if it is not already a member. ... If anObject is already present in the set, this method has no effect on either the set or anObject." The terms "a member" and "present" are not defined and there are