Deprecated NSMenu Methods

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

Deprecated in OS X v10.2

setMenuZone:

Sets the zone from which NSMenu objects should be allocated (Deprecated in OS X v10.2.)

+ (void)setMenuZone:(NSZone *)zone
Parameters
zone

The memory zone to set.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.2.
Declared In
NSMenu.h

attachedMenu

Returns the menu currently attached to the receiver. (Deprecated in OS X v10.2.)

- (NSMenu *)attachedMenu
Return Value

The menu currently attached to the receiver or nil if there’s no such object.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.2.
Declared In
NSMenu.h

contextMenuRepresentation

Deprecated. (Deprecated in OS X v10.2. OS X does not use menu representations to draw menus.)

- (id)contextMenuRepresentation
Return Value

nil.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.2.
Declared In
NSMenu.h

isAttached

Returns a Boolean value that indicates whether the receiver is currently attached to another menu. (Deprecated in OS X v10.2.)

- (BOOL)isAttached
Return Value

YES if the receiver is currently attached to another menu, otherwise NO.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.2.
Declared In
NSMenu.h

locationForSubmenu:

Returns the location in screen coordinates where the given submenu is displayed when opened as a submenu of the receiver. (Deprecated in OS X v10.2.)

- (NSPoint)locationForSubmenu:(NSMenu *)aSubmenu
Parameters
aSubmenu

A menu object that is a submenu of the receiver.

Return Value

An NSPoint structure describing the location or (0.0, 0.0) if the submenu does not exist in the receiver.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.2.
Declared In
NSMenu.h

menuRepresentation

Deprecated. (Deprecated in OS X v10.2. OS X does not use menu representations to draw menus.)

- (id)menuRepresentation
Return Value

nil.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.2.
Declared In
NSMenu.h

setContextMenuRepresentation:

Deprecated. (Deprecated in OS X v10.2. OS X does not use menu representations to draw menus.)

- (void)setContextMenuRepresentation:(id)menuRep
Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.2.
Declared In
NSMenu.h

setMenuRepresentation:

Deprecated. (Deprecated in OS X v10.2. OS X does not use menu representations to draw menus.)

- (void)setMenuRepresentation:(id)menuRep
Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.2.
Declared In
NSMenu.h

setTearOffMenuRepresentation:

Deprecated. (Deprecated in OS X v10.2. OS X does not use menu representations to draw menus.)

- (void)setTearOffMenuRepresentation:(id)menuRep
Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.2.
Declared In
NSMenu.h

sizeToFit

Resizes the receiver to exactly fit its items. (Deprecated in OS X v10.2.)

- (void)sizeToFit
Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.2.
Declared In
NSMenu.h

tearOffMenuRepresentation

Deprecated. (Deprecated in OS X v10.2. OS X does not use menu representations to draw menus.)

- (id)tearOffMenuRepresentation
Return Value

nil.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.2.
Declared In
NSMenu.h