observing set mutations
observing set mutations
- Subject: observing set mutations
- From: Paul Forgey <email@hidden>
- Date: Mon, 12 Sep 2005 02:14:15 -0700
I'm trying to observe set mutations for a to-many relationship. In
my observer I can see items being added and removed OK. If the item
is changed via the inverse to-one relationship updating to another
value, things get screwy.
When adding the observer, I'm passing NSKeyValueObservingOptionNew |
NSKeyValueObservingOptionOld to the options field. When the item is
modified, I get NSKeyValueChangeSetting, no value for the
NSKeyValueChangedNewKey, and the NEW value in the
NSKeyValueChangedOldKey.
To investigate further I implemented
willChangeValueForKey:withSetMutation:usingObjects in my subclass.
What I am seeing here lines up with this behavior.
NSKeyValueMinusSetMutation with the new object in usingObjects.
What the heck is going on, and how do I simply observe to-many
objects being inserted or removed for whatever reason?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden