On Aug 29, 2011, at 9:43 AM, Dave Zarzycki wrote: > Or, your code could subclass NSMutableSet and interpose the methods that add > to the set. In other words, mentally separate "objects that are equal" from > "objects that should be in the set". The former is an equality check, the > latter is a policy decision.
Note that NSMutableSet is a class cluster. Class NSMutableSet itself does not implement any storage. If you want to subclass NSMutableSet, you'll need to implement the storage and all of the core methods from NSSet and NSMutableSet yourself. Note that NSSet and NSMutableSet define set member equality as -isEqual:. Violating that in a subclass may break other code. -- Greg Parker gpar...@apple.com Runtime Wrangler _______________________________________________ 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 cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com