• 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
KVO of NSObjectController vs. NSMutableDictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

KVO of NSObjectController vs. NSMutableDictionary


  • Subject: KVO of NSObjectController vs. NSMutableDictionary
  • From: Thomas Engelmeier <email@hidden>
  • Date: Tue, 12 Feb 2008 15:27:10 +0100

Hi,

I'm recoding an dynamic generated UI to use bindings and KVO.

In my Window Controller, I create an NSObjectController that with an content NSMutableDictionary for the current UI values.

When I'm registering with the NSObjectController as suggested by the Bindings reference to observe selectedObjects, I receive value notifications without the old and new value, opposed to registering directly to the content dictionary, ie. observing the dictionary I get:

PTPTester[2021:813] KVO change of 53570: {
    kind = 1;
    new = 0;
    old = 1;
}

vs. observing  NSObjectController

PTPTester KVO change of selectedObjects.53570: {
    kind = 1;
    new = <null>;
    old = <null>;
}

Q1: Why does the bindings reference recommed observing the NSObjectController? Is there any drawback observing directly the content object?

Q2: Is there an way to get also the old and new values observing the NSObjectController?

TIA,
	Tom_E



_______________________________________________

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


  • Follow-Ups:
    • Re: KVO of NSObjectController vs. NSMutableDictionary
      • From: Scott Anguish <email@hidden>
  • Prev by Date: Re: Event Tap strangeness
  • Next by Date: Re: Binding NSArrayController to program
  • Previous by thread: Re: Event Tap strangeness
  • Next by thread: Re: KVO of NSObjectController vs. NSMutableDictionary
  • Index(es):
    • Date
    • Thread