Deprecated NSMenuItem Methods

A method identified as deprecated has been superseded and may become unsupported in the future.

Deprecated in OS X v10.6

mnemonic

Deprecated. Returns the character in the menu item title that appears underlined for use as a mnemonic. (Deprecated in OS X v10.6.)

- (NSString *)mnemonic
Discussion

If there is no mnemonic character, returns an empty string.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.6.
Declared In
NSMenuItem.h

mnemonicLocation

Deprecated. Returns the position of the underlined character in the menu item title used as a mnemonic. (Deprecated in OS X v10.6.)

- (NSUInteger)mnemonicLocation
Discussion

The position is the zero-based index of that character in the title string. If the receiver has no mnemonic character, returns NSNotFound.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.6.
Declared In
NSMenuItem.h

setMnemonicLocation:

Deprecated. Sets the character of the menu item title at location that is to be underlined. (Deprecated in OS X v10.6.)

- (void)setMnemonicLocation:(NSUInteger)location
Parameters
location

An integer index into the character array of the title. location must be from 0 to 254.

Discussion

This character identifies the access key by which users can access the menu item.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.6.
Declared In
NSMenuItem.h