Re: Cocoa class extension best practice
Re: Cocoa class extension best practice
- Subject: Re: Cocoa class extension best practice
- From: Steve Mills <email@hidden>
- Date: Tue, 15 Oct 2013 16:39:33 -0500
On Oct 15, 2013, at 16:05:06, Andy Lee <email@hidden> wrote:
> Out of curiosity, when you say you have "extended" NSMenu, do you mean you've subclassed it? That is what I would infer from your mention of class extensions. Is there some reason you don't add a category instead? I wonder because you only mentioned adding methods, not overriding them or adding ivars.
This isn't a subclass, but a category. I tend to interchange the terms "extension" and "category".
@implementation NSMenu(FCExtensions)
-(void) someMethod
{
for(NSMenuItem* item in [self itemArray])
;
}
@end
--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157
_______________________________________________
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