• 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: Binding NSMenuItem 'value' or 'title': Accessors not invoked
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding NSMenuItem 'value' or 'title': Accessors not invoked


  • Subject: Re: Binding NSMenuItem 'value' or 'title': Accessors not invoked
  • From: "I. Savant" <email@hidden>
  • Date: Tue, 9 Oct 2007 13:24:35 -0400

> > Are your accessors properly enclosed with will/
> > didChangeValueForKey: calls?
>
> No they were not, and fixing that fixed the problem.  Thanks again!

  D'oh! ;-)

  Basically any time something's not "automagically" updating, that's
the most likely culprit (in my experience, that is). It is *so worth*
going back over the KVC/KVO documentation any time you run into such a
problem. It's easy to overlook and if you re-read the rules every time
you break them, you're more likely to remember them. ;-)

  In this particular case, checking an enabled state wasn't a problem
because this is checked every time the menu is displayed due to (as
you guessed) the validation mechanism. The title, however, would not
be. If you want it to 'notice' this change, proper notifications must
be sent (KVC/KVO).

--
I.S.
_______________________________________________

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: 
 >Binding NSMenuItem 'value' or 'title': Accessors not invoked (From: Jerry Krinock <email@hidden>)
 >Re: Binding NSMenuItem 'value' or 'title': Accessors not invoked (From: "I. Savant" <email@hidden>)
 >Re: Binding NSMenuItem 'value' or 'title': Accessors not invoked (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Binding NSMenuItem 'value' or 'title': Accessors not invoked
  • Next by Date: Re: Where/when to #import
  • Previous by thread: Re: Binding NSMenuItem 'value' or 'title': Accessors not invoked
  • Next by thread: Binding NSMenuItem 'value' or 'title': Accessors not invoked
  • Index(es):
    • Date
    • Thread