NSMenu doc bug?
NSMenu doc bug?
- Subject: NSMenu doc bug?
- From: Isaac Sherman <email@hidden>
- Date: Sun, 06 Jan 2002 23:39:51 -0500
I'm not sure, but I think this is a documentation bug. It's in NSMenu.
I've highlited the particular point between two pipes.
<quote>
addItem:
- (void)addItem:(id <NSMenuItem>)newItem
Adds the menu item newItem to the end of the receiver. In its implementation
this method invokes insertItem:atIndex:. Thus, the receiver does not accept
the menu item if it already belongs to another menu. After adding the menu
item, the receiver updates itself.
addItemWithTitle:action:keyEquivalent:
- (id <NSMenuItem>)addItemWithTitle:(NSString *)aString
action:(SEL)aSelector keyEquivalent:(NSString *)keyEquiv
Adds a new item with title aString, action aSelector, and key equivalent
keyEquiv to the end of the receiver.|Returns the new menu item|. If you do
not want the menu item to have a key equivalent, keyEquiv should be an empty
string (@"") and not nil.
</quote>
Why the difference between the two items? Why would two very similar
functions be so different from each other (void/id <NSMenuItem>)? Is this
correct? Or am I missing something, again?
Thanks,
--
Isaac Sherman
MotaSoft Software (forthcoming)