• 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
NSMenuItem <protocol>
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSMenuItem <protocol>


  • Subject: NSMenuItem <protocol>
  • From: Marten van Gelderen <email@hidden>
  • Date: Wed, 10 Mar 2004 17:26:12 +0100

Hello All,

As of XCode 1.1 the following 3 methods in NSMenu:

- (id <NSMenuItem>)itemAtIndex:(int)index;
- (id <NSMenuItem>)itemWithTitle:(NSString *)aTitle;
- (id <NSMenuItem>)itemWithTag:(int)tag;

return an (id <NSMenuItem>) and no longer a (NSMenuItem *) as was the case in PB (or perhaps XCode 1.0?).

The documentation on MSMenuItem mentions that the protocol is depreciated and should no longer be used.

I do not fully understand this change. Has it perhaps to do with the improvement that now menu items with submenu's can have their own action?

From an aesthetical point of view I like a NSMenuItem * better that an id <NSMenuItem>, but that might be my own bias and unfamiliarity with protocols.
--
Groeten, Marten
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: NSMenuItem <protocol>
      • From: j o a r <email@hidden>
  • Prev by Date: Re: Thread safety of NSPipe
  • Next by Date: Re: Wisdom of overriding isEqual:
  • Previous by thread: Re: Thread safety of NSPipe
  • Next by thread: Re: NSMenuItem <protocol>
  • Index(es):
    • Date
    • Thread