• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How To Bind The Enabled Property of NSPopUpButtonCell Menu Items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How To Bind The Enabled Property of NSPopUpButtonCell Menu Items


  • Subject: Re: How To Bind The Enabled Property of NSPopUpButtonCell Menu Items
  • From: Lee Ann Rucker <email@hidden>
  • Date: Sat, 03 Aug 2013 19:48:12 -0700 (PDT)
  • Thread-topic: How To Bind The Enabled Property of NSPopUpButtonCell Menu Items

Another approach - the tables I thought were using bindings on menu items turned out to be using tableView:willDisplayCell:forTableColumn:row:

----- Original Message -----
From: "Jerry Krinock" <email@hidden>
To: "Cocoa Dev" <email@hidden>
Sent: Saturday, August 3, 2013 7:27:17 PM
Subject: Re: How To Bind The Enabled Property of NSPopUpButtonCell Menu Items


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
_______________________________________________

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


References: 
 >How To Bind The Enabled Property of NSPopUpButtonCell Menu Items (From: Chris Tracewell <email@hidden>)
 >Re: How To Bind The Enabled Property of NSPopUpButtonCell Menu Items (From: Lee Ann Rucker <email@hidden>)
 >Re: How To Bind The Enabled Property of NSPopUpButtonCell Menu Items (From: Chris Tracewell <email@hidden>)
 >Re: How To Bind The Enabled Property of NSPopUpButtonCell Menu Items (From: Lee Ann Rucker <email@hidden>)
 >Re: How To Bind The Enabled Property of NSPopUpButtonCell Menu Items (From: Chris Tracewell <email@hidden>)
 >Re: How To Bind The Enabled Property of NSPopUpButtonCell Menu Items (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: How To Bind The Enabled Property of NSPopUpButtonCell Menu Items
  • Next by Date: drawing outside the dirtyRect (of a NSView sub class) and overlapping NSTableView
  • Previous by thread: Re: How To Bind The Enabled Property of NSPopUpButtonCell Menu Items
  • Next by thread: There must be a live human at Apple?
  • Index(es):
    • Date
    • Thread