• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa class extension best practice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Cocoa class extension best practice (From: Steve Mills <email@hidden>)
 >Re: Cocoa class extension best practice (From: Andy Lee <email@hidden>)

  • Prev by Date: Re: Cocoa class extension best practice
  • Next by Date: Re: dispatch queues and KVO?
  • Previous by thread: Re: Cocoa class extension best practice
  • Next by thread: dispatch queues and KVO?
  • Index(es):
    • Date
    • Thread