• 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
cmd+w and File menu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cmd+w and File menu


  • Subject: cmd+w and File menu
  • From: "Wesley Smith" <email@hidden>
  • Date: Wed, 3 Sep 2008 14:41:39 -0700

I have an application where I generate a number of the menus from
scripts and runtime.  Something I noticed when I replace the File menu
defined in the app's MainMenu.nib is that I can no longer use cmd+w to
close windows.  I'm not totally sure why this is.  The application
loads scripts, which can create windows among other things.  When I
load a script that creates a window, the Window menu shows the title
of it as usual, but cmd+w create an alert bell type sound indicating
an invalid action.  My question is how can I set the app up to handle
cmd+w properly?  I looked at the NSResponder and NSApplications docs
but didn't see anything helpful.  When I hit cmd+w, my app's
NSResponder does receive a keyDown event like I thought it might.
Where do I insert my code to grab this event?

thanks,
wes
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: cmd+w and File menu
      • From: "Wesley Smith" <email@hidden>
  • Prev by Date: Re: Why do all these methods of measuring string metrics with font attribute fail?
  • Next by Date: NSString/NSMutable String Concatenation
  • Previous by thread: Re: Selection in NSCollectionView
  • Next by thread: Re: cmd+w and File menu
  • Index(es):
    • Date
    • Thread