Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

File - Close menu item grayed out



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.