• 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
observing set mutations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: NSArrayController selectNext updating late
  • Next by Date: Final attempt regarding core data / opengl...
  • Previous by thread: Service,NSSavePanel, & keyboard focus ultraweirdness
  • Next by thread: Final attempt regarding core data / opengl...
  • Index(es):
    • Date
    • Thread