Returns the index of the menu item that holds the specified represented object.
- macOS 10.0+
The represented object associated with a menu item.
The index of the menu item that owns the specified object, or
-1 if no such menu item was found.
Represented objects bear some direct relation to the title or image of a menu item; for example, an item entitled “100” might have an
NSNumber object encapsulating that value as its represented object. This method invokes the method of the same name of its