On Wed, 13 Aug 2008 15:11:47 +0800 (WST), [EMAIL PROTECTED] said:
>Hi,
>
>I have an application that sometimes runs a modal window (entered via
>[NSApplication runModalForWindow:]).  During this modal session, I'd like
>to allow the user to select a menu item (namely, the "Quit" item),
>however, all menu items are automatically disabled when the modal session
>is entered.
>
>Is there any way to keep a menu item enabled during a modal session?

In the case of the Quit item, since this is connected directly to the app
object, you will have to subclass the application class, declare your
subclass as the target's primary class, and in your subclass implement
validateMenuItem and worksWhenModal. See, always see:

http://www.cocoabuilder.com/archive/message/cocoa/2004/10/7/119051

m.


-- 
matt neuburg, phd = [EMAIL PROTECTED], <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
One of the 2007 MacTech Top 25: <http://tinyurl.com/2rh4pf>
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to