• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSMenuItem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMenuItem


  • Subject: Re: NSMenuItem
  • From: Andrew Farmer <email@hidden>
  • Date: Thu, 18 May 2006 12:09:47 -0700

On 17 May 06, at 06:13, Vasya Danylyshyn wrote:
newItem = [[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:@"My item" action:NULL keyEquivalent:[NSString stringWithFormat:@"%C",NSPageUpFunctionKey]];
[newItem setKeyEquivalentModifierMask:NSNumericPadKeyMask];


this code, create menu item, with 'PageUp' key equivalent.

If i try use:
newItem = [[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:@"My item" action:NULL keyEquivalent:[NSString stringWithFormat:@"%C",0x0020]];
[newItem setKeyEquivalentModifierMask:NSNumericPadKeyMask];
(where 0x0020 - space character)
the menu no contains 'SPACE' key equivalent :(

That's correct. The menu routines don't support the display of the space bar as a key. iTunes works around this by setting the menu item title to something like


"Play          space"

However, this doesn't always quite work right; the alignment is a little bit off.

Attachment: PGP.sig
Description: This is a digitally signed message part

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >NSMenuItem (From: Vasya Danylyshyn <email@hidden>)
 >Re: NSMenuItem (From: Ondra Cada <email@hidden>)
 >Re: NSMenuItem (From: Vasya Danylyshyn <email@hidden>)

  • Prev by Date: Re: coredata sql store on WebDAV mounted volume
  • Next by Date: Re: NSTreeController: do leaf and non-leaf nodes have to be of the same class?
  • Previous by thread: Re: NSMenuItem
  • Next by thread: programmatically determining if the machine is intel or not
  • Index(es):
    • Date
    • Thread