NSMenuItem <protocol>
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.