Re: Quit menu item undimming itself?!
Re: Quit menu item undimming itself?!
- Subject: Re: Quit menu item undimming itself?!
- From: John Stiles <email@hidden>
- Date: Tue, 9 May 2006 13:32:03 -0700
On May 9, 2006, at 12:13 PM, j o a r wrote:
On 9 maj 2006, at 21.06, John Stiles wrote:
This is set. I didn't even know about this option before :)
I assume there would be ramifications for disabling it, right? So
what is the best course of action here?
You basically have two choices:
1) Use the super-elite first-responder empowered auto-validation.
Implement NSMenuValidation in your menu item targets to control the
enabled state of menu items when the default implementation is not
enough. This is the best choice in the vast majority of cases.
2) Use manual validation. You have to enable / disable menu items
yourself, as appropriate.
Either one works fine. Choose the one that suits you best!
In your case you might consider re-targeting the quit menu item to
some object (probably your main controller class) that can
implement NSMenuValidation to return NO when required.
That's probably best. I just want to control validation on this one
item and leave the rest of the menu alone.
_______________________________________________
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