setObjectValue:

Selects the item at a specific index using an object value.

Declaration

- (void)setObjectValue:(id)object

Parameters

object

An NSNumber object containing the index (an integer) of the item you want to select. Specify the index -1 to deselect all items. You can also use an object other than an NSNumber object. In that case, the object must respond to the intValue message and return an appropriate index value.

See Also

Accessing the items

itemArray

An array of NSMenuItem objects that represent the items in the menu.

numberOfItems

The number of items in the menu.

- indexOfItem:

Returns the index of the specified menu item.

- indexOfItemWithTitle:

Returns the index of the item with the specified title.

- indexOfItemWithTag:

Returns the index of the menu item with the specified tag.

- indexOfItemWithRepresentedObject:

Returns the index of the menu item that holds the specified represented object.

- indexOfItemWithTarget:andAction:

Returns the index of the menu item with the specified target and action.

- itemAtIndex:

Returns the menu item at the specified index.

- itemWithTitle:

Returns the menu item with the specified title.

lastItem

The last item in the menu.

- objectValue

Returns the index of the selected item.