Re: NSSet primitive methods
Re: NSSet primitive methods
- Subject: Re: NSSet primitive methods
- From: "Michael Ash" <email@hidden>
- Date: Sat, 11 Oct 2008 10:25:16 -0400
On Sat, Oct 11, 2008 at 10:15 AM, Glen Low <email@hidden> wrote:
> Hi All
>
> I want to subclass the class cluster of NSSet.
>
> The documentation for the class clusters NSArray/NSMutableArray and
> NSDictionary/NSMutableDictionary clearly shows what the primitive methods
> are, so you only need to reimplement these for the subclass to work e.g.
>
> NSArray's primitives are count: and objectAtIndex: -- all the other methods
> are implemented on top of these.
>
> Now I want to do the same for NSSet, but the docs don't mention what its
> primitive methods are.
Indeed a strange omission! However, all is not lost. By convention, a
class cluster's primitive methods are the ones declared in its
@interface. All non-primitive methods are declared in categories. So
in this case, the primitive methods are count, member:, and
objectEnumerator.
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden