• 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: NSPopupUpButton not showing checked menu items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPopupUpButton not showing checked menu items


  • Subject: Re: NSPopupUpButton not showing checked menu items
  • From: "Kyle Sluder" <email@hidden>
  • Date: Sun, 23 Nov 2008 14:15:40 -0500

On Sun, Nov 23, 2008 at 10:51 AM, Steve Christensen <email@hidden> wrote:
> - (void) setInterpolationMode:(NSInteger)mode
> {
>        [self willChangeValueForKey:@"interpolationMode"];
>        _interpolationMode = mode;
>        [self didChangeValueForKey:@"interpolationMode"];
>
>        // set the title image to that of the current mode
>        [[_interpolationModePopup itemAtIndex:0]
> setImage:_interpolationImages[mode]];
> }
>
>> Additionally, are you overriding +automaticallyNotifiesObserversForKey: or
>
> No.

If you are not overriding +automaticallyNotifiesObserversForKey:, then
why are you manually sending -willChangeValueForKey: and
-didChangeValueForKey:?  You are already benefitting from automatic
KVO support (assuming your accessor is named -interpolationMode).
-willChangeValueForKey: and -didChangeValueForKey: are only for manual
KVO support, which requires overriding
+automaticallyNotifiesObserversForKey: to return NO for the key in
question: http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueObserving/Concepts/AutoVsManual.html#//apple_ref/doc/uid/20001844-178876

>> sending +setKeys:triggerChangeNotificationsForDependentKey: anywhere?
>
> Yes, for a couple of other controller keys that are dependent on the one
> above.
> They get set in my controller's +initialize method.

The reason I ask these questions is so that by examining your code, we
may figure out what's going wrong.  The crucial step in this process
is the posting of code.  ;-)

--Kyle Sluder
_______________________________________________

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: 
 >NSPopupUpButton not showing checked menu items (From: Steve Christensen <email@hidden>)
 >Re: NSPopupUpButton not showing checked menu items (From: "Kyle Sluder" <email@hidden>)
 >Re: NSPopupUpButton not showing checked menu items (From: Steve Christensen <email@hidden>)
 >Re: NSPopupUpButton not showing checked menu items (From: "Kyle Sluder" <email@hidden>)
 >Re: NSPopupUpButton not showing checked menu items (From: Steve Christensen <email@hidden>)

  • Prev by Date: Re: Automatic file numbering ideas...
  • Next by Date: Re: Automatic file numbering ideas...
  • Previous by thread: Re: NSPopupUpButton not showing checked menu items
  • Next by thread: Re: NSPopupUpButton not showing checked menu items
  • Index(es):
    • Date
    • Thread