Re: Triggering a Method when a Core Data Property changes.

Kyle Sluder <[email protected]>
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
On Fri, Oct 16, 2009 at 10:57 AM, Joshua Garnham
<joshua.garnham-/[email protected]> wrote:
> I am trying to trigger a method when A Core Data property is
> changed, e.g A Text Fields Text in a Table (connected to Core Data) is
> changed. Basically I want to be Key Value Observing the CD 'name' property of all
> the objects in my Tree Controller, so that when the 'name' property of
> one of my objects is changed it triggers an action. How would I do this though?

You need to observe each object as it is added to the tree controller.
 This means observing the arrangedObjects property of the tree
controller, using that change notification to observe the children
property of the arrangedObjects proxy, using those change
notifications to observe the children property of each of those
objects, and so on.

--Kyle Sluder
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.