Re: How To Bind The Enabled Property of NSPopUpButtonCell Menu Items
Re: How To Bind The Enabled Property of NSPopUpButtonCell Menu Items
- Subject: Re: How To Bind The Enabled Property of NSPopUpButtonCell Menu Items
- From: Jerry Krinock <email@hidden>
- Date: Sat, 03 Aug 2013 19:27:17 -0700
On 2013 Aug 02, at 16:21, Chris Tracewell <email@hidden> wrote:
> I can't see how bindings and validateMenuItem can work together in this scenario.
I've found myself asking questions like that until someone on this list pointed out to me that I was trying too hard. Although I'm a believer in Cocoa bindings, I therefore make an exception when menus are involved. Because menus are only on the screen transiently, during modal sessions, the bindings advantage of keeping model and view in sync is moot.
Since this issue seems like it's starting to be a time suck for you, consider if you could disconnect the bindings. I find I can do anything I need with target, action and -menuNeedsUpdate:, -validateMenuItem:. To disable a menu item, give it a nil target and NULL action in -menuNeedsUpdate:.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden