Instance Method

indexOfItemWithTag:

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

Declaration

- (NSInteger)indexOfItemWithTag:(NSInteger)tag;

Parameters

tag

The tag of the menu item you want.

Return Value

The index of the item or -1 if no item with the specified tag was found.

Discussion

This method invokes the method of the same name of its NSPopUpButtonCell object.

See Also

Getting the indices of menu items

- indexOfItem:

Returns the index of the specified menu item.

- indexOfItemWithTitle:

Returns the index of the item with the specified title.

- 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.