KVO of NSObjectController vs. NSMutableDictionary
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