• 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
File - Close menu item grayed out
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

File - Close menu item grayed out


  • Subject: File - Close menu item grayed out
  • From: Robert Liesenfeld <email@hidden>
  • Date: Fri, 30 Mar 2007 09:26:02 -0700

Hi folks-

Sorry for what is probably a fairly newbie question, but I've done a fair bit of research and can't seem to find any solution on this one.

I have a small app which has Zoom (and resize) disabled, but Close and Minimize buttons enabled. The File menu contains the Close (Cmd- W) menu item, and the menu bar is set to "Auto Enables Items". When I look at the MainMenu.nib in Interface Builder, the Close menu item is enabled, but when I run my app, it's disabled (grayed out).

I've scoured the documentation for NSApplication and NSWindow, thinking perhaps there was some delegate call I was supposed to implement. The documentation for NSWindow -windowWillClose: seems to indicate that this method is not what I'm looking for. I've already implemented -applicationShouldTerminateAfterLastWindowClosed:, and that works when the user clicks the Close button in the window titlebar. I just want to be able to quit my app with a Cmd-W... does anyone have any ideas?

Thanks!
-Robert Liesenfeld
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Prev by Date: Re: Converting WebView to JPEG
  • Next by Date: Re: Converting WebView to JPEG
  • Previous by thread: Re: Converting WebView to JPEG
  • Next by thread: nextKeyView not cycling through NSEditText fields
  • Index(es):
    • Date
    • Thread