MonobjcMonobjc Documented Class Library
IndexOfItemWithTargetAndAction Method (anObject, actionSelector)
NamespacesMonobjc.AppKitNSMenuIndexOfItemWithTargetAndAction(Id, IntPtr)

Returns the index of the first menu item in the receiver that has a specified action and target.

Original signature is '- (NSInteger)indexOfItemWithTarget:(id)anObject andAction:(SEL)actionSelector'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual NSInteger IndexOfItemWithTargetAndAction(
	Id anObject,
	IntPtr actionSelector
)
Public Overridable Function IndexOfItemWithTargetAndAction ( _
	anObject As Id, _
	actionSelector As IntPtr _
) As NSInteger
public:
virtual NSInteger IndexOfItemWithTargetAndAction(
	Id^ anObject, 
	IntPtr actionSelector
)
Parameters
anObject (Id)
An object that is set as the target of a menu item of the receiver.
actionSelector (IntPtr)
A selector identifying an action method. If actionSelector is NULL, the first menu item in the receiver that has target anObject is returned
Return Value
The integer index of the menu item or, if no such menu item is in the menu, –1.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.AppKit (Module: Monobjc.AppKit)