• 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: NSMenuItem Binding Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMenuItem Binding Problem


  • Subject: Re: NSMenuItem Binding Problem
  • From: Dave Keck <email@hidden>
  • Date: Wed, 11 Mar 2009 12:32:33 -1000

It sounds like you're accessing the variable directly, which doesn't
allow the KVO system to send the appropriate notifications in order to
notify the menu item that there was a change. If you want to set the
value of the variable and expect the menu item to respond, you must
make sure the appropriate KVO notifications are being sent. This can
be done in several ways - through generated accessors (properties) or
sending the willChangeValueForKey/didChangeValueForKey messages
manually.

Try reading up on KVC:
http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/Concepts/BasicPrinciples.html
and KVO: http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueObserving/Concepts/Overview.html

(KVO/KVC are the technologies that the bindings system relies on.)

... and could you post the relevant code?

David
_______________________________________________

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: 
 >NSMenuItem Binding Problem (From: Adil Saleem <email@hidden>)

  • Prev by Date: A minimal InputManager bundle
  • Next by Date: Re: Is cascading Nib Loading from -awakeFromNib permissible?
  • Previous by thread: NSMenuItem Binding Problem
  • Next by thread: Is cascading Nib Loading from -awakeFromNib permissible?
  • Index(es):
    • Date
    • Thread