MonobjcMonobjc Documented Class Library
NSMenuItem Constructor (itemName, anAction, charCode)
NamespacesMonobjc.AppKitNSMenuItemNSMenuItem(NSString, IntPtr, NSString)

Returns an initialized instance of an NSMenuItem.

Original signature is '- (id)initWithTitle:(NSString *)itemName action:(SEL)anAction keyEquivalent:(NSString *)charCode'

Available in Mac OS X v10.0 and later.

Declaration Syntax
C#Visual BasicVisual C++
public NSMenuItem(
	NSString itemName,
	IntPtr anAction,
	NSString charCode
Public Sub New ( _
	itemName As NSString, _
	anAction As IntPtr, _
	charCode As NSString _
	NSString^ itemName, 
	IntPtr anAction, 
	NSString^ charCode
itemName (NSString)
The title of the menu item. This value must not be nil (if there is no title, specify an empty NSString).
anAction (IntPtr)
The action selector to be associated with the menu item. This value must be a valid selector or NULL.
charCode (NSString)
A string representing a keyboard key to be used as the key equivalent. This value must not be nil (if there is no key equivalent, specify an empty NSString).
Return Value
An instance of NSMenuItem, or nil if the object couldn't be created.
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)