• 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
Menu Item's Key Equivalents Affecting Other Item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Menu Item's Key Equivalents Affecting Other Item


  • Subject: Menu Item's Key Equivalents Affecting Other Item
  • From: Seth Willits <email@hidden>
  • Date: Fri, 6 May 2005 19:55:17 -0700

I don't know what it is, but Cocoa and I just aren't getting along today.


Here's a small sample project that demonstates the problem: http://www.freaksw.com/MenuItemBug.zip


The latest problem I'm having is a simple case where by changing one menu item's key equivalent, it changes another's as well. I'm attempting to do the same thing as Safari where it shifts around which menu item uses Cmd-W and which is Cmd-Shift-W.


Essentially I have:


- (void)windowDidBecomeKey:(NSNotification *)aNotification
{
// Close Window Menu Item
[CloseWindowItem setKeyEquivalent:@"W"];
[CloseWindowItem setKeyEquivalentModifierMask:NSCommandKeyMask | NSShiftKeyMask];


    // Close Document Menu Item
    [CloseDocumentItem setKeyEquivalent:@"W"];
    [CloseDocumentItem setKeyEquivalentModifierMask:NSCommandKeyMask];
}


And when the window is key, BOTH menu item's have Cmd-Shift-W as their key equivalent.




Seth Willits
----------------------------------------------------------
Freak Software - http://www.freaksw.com/
ResExcellence - http://www.resexcellence.com/realbasic/
----------------------------------------------------------

_______________________________________________
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


  • Follow-Ups:
    • Re: Menu Item's Key Equivalents Affecting Other Item
      • From: Ondra Cada <email@hidden>
    • Re: Menu Item's Key Equivalents Affecting Other Item
      • From: Seth Willits <email@hidden>
  • Prev by Date: Re: CoreData issue when updating a file format
  • Next by Date: Tracking changes from bindings
  • Previous by thread: Re: Core Data Question
  • Next by thread: Re: Menu Item's Key Equivalents Affecting Other Item
  • Index(es):
    • Date
    • Thread