Re: NSMenu doc bug?
Re: NSMenu doc bug?
- Subject: Re: NSMenu doc bug?
- From: Fritz Anderson <email@hidden>
- Date: Sun, 6 Jan 2002 23:44:47 -0600
On Sunday, January 6, 2002, at 10:39 PM, Isaac Sherman wrote:
...
- (void)addItem:(id <NSMenuItem>)newItem
...
- (id <NSMenuItem>)addItemWithTitle:(NSString *)aString
action:(SEL)aSelector keyEquivalent:(NSString *)keyEquiv
...
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?
It is correct.
The idea is to add an NSMenuItem to an NSMenu. The first method adds an
item that you have created yourself; the second creates one for you, and
gives you back the item it created.
-- F