• 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
NSMenu doc bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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)


  • Follow-Ups:
    • Re: NSMenu doc bug?
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: CurrencyConverterTutorial.pdf
  • Next by Date: Re: PB Q
  • Previous by thread: Re: CurrencyConverterTutorial.pdf
  • Next by thread: Re: NSMenu doc bug?
  • Index(es):
    • Date
    • Thread