Observing model changes with Cocoa Bindings and NSArrayController
        Posted  
        
            by jbrennan
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by jbrennan
        
        
        
        Published on 2010-05-04T02:25:06Z
        Indexed on 
            2010/05/04
            2:28 UTC
        
        
        Read the original article
        Hit count: 682
        
I've got an NSArrayController bound to a mutable array in my controller, which manages an array of my model objects. The array controller is bound to my UI. It works well.
Now I'm trying to manually observe when a value changes in my model in my controller class (basically I'm marking the changed model as "needsToSave" for later on, but there are a few other tasks I have when it changes).
I've read up on KVO but I'm not entirely sure what I need to be observing... The NSArrayController? The array of objects? each model object itself? Confusion.
Any pointers would be very helpful. Thanks in advance!
© Stack Overflow or respective owner