Re: Menu items validation woes...
Re: Menu items validation woes...
- Subject: Re: Menu items validation woes...
- From: Dustin Voss <email@hidden>
- Date: Tue, 2 Sep 2003 21:27:01 -0700
On Tuesday, September 2, 2003, at 01:38 AM, Jirome Foucher wrote:
Hi all,
I have some problems understanding how menu items are auto-enabled.
Here's what I'm trying to achieve :
- I've got a NSTableView which has a menu connected to it in IB
- this menu has some items that need to be enabled only if the
selection in the table is 1 and only 1 item
- the NSTableView is holded inside a NSWindow that can have multiple
instances (the content of the table is different in each window).
I'm aware of the -(BOOL)validateMenuItem:(NSMenuItem*)anItem method,
but I don't really see where I have to add this method.
Does anybody have some hints ?
Thanks
Jerome
As far as I know, the validation protocol follows the responder chain.
So just put it in the window controller.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.