Re: Key Value Observing of NSMutableArray inside an object

2012-01-28 Thread R
More appropriate: - (void)addDataObject:(DataObject *)theDataObject { NSMutableArray *dataObjectArrayKVC=[self mutableArrayValueForKey:@"dataObjectArray"]; [dataObjectArrayKVC addObject:theDataObject]; } On Jan 28, 8:19 pm, R wrote: > Mikael, > > I think all you need is: > > - (void)addD

Re: Key Value Observing of NSMutableArray inside an object

2012-01-28 Thread R
Mikael, I think all you need is: - (void)addDataObject:(DataObject *)theDataObject { dataObjectArrayKVC=[self mutableArrayValueForKey:@"dataObjectArray"]; [dataObjectArrayKVC addObject:theDataObject]; } dataObjectArrayKVC is a proxy for dataObjectArray. Objects added/ removed to/from da

Re: Key Value Observing of NSMutableArray inside an object

2012-01-28 Thread Quincey Morris
On Jan 28, 2012, at 13:28 , Mikael Wämundson wrote: > I have put an NSMutableArray (dataObjectArray) in my class > DataObjectCollection. I have also made it possible to add objects to > DataObjectCollection and hence the array by implementing > - (void)addDataObject:(DataObject *)theDataObject >

Re: Key Value Observing of NSMutableArray inside an object

2012-01-28 Thread Keary Suska
On Jan 28, 2012, at 2:28 PM, Mikael Wämundson wrote: > Is there something I need to do with my class DataObjectCollection to make > the observing work, i.e. to make it KVO compliant? Implement and use collection accessor methods: http://developer.apple.com/library/mac/#documentation/Cocoa/Concep

Key Value Observing of NSMutableArray inside an object

2012-01-28 Thread Mikael Wämundson
Hi, Background: I have put an NSMutableArray (dataObjectArray) in my class DataObjectCollection. I have also made it possible to add objects to DataObjectCollection and hence the array by implementing - (void)addDataObject:(DataObject *)theDataObject { NSIndexSet *loneIndex = [NSIndexSet in