Re: objectInXXXAtIndex: exception
Re: objectInXXXAtIndex: exception
- Subject: Re: objectInXXXAtIndex: exception
- From: mmalcolm crawford <email@hidden>
- Date: Mon, 9 May 2005 18:00:28 -0700
On May 9, 2005, at 3:45 PM, Bertrand Landry-Hetu wrote:
What happens is that the application starts up, the GUI connects to
the model, everything works. Something triggers an update of our model
and ends up calling removeAllObjects on the NSMutableArray that
represents Bar. So to keep the bindings updated we wrapped that call
in willChangeValueForKey:@"bar", didChangeValueForKey:@"bar", so it
does trigger the NSArrayControllers that is bound to Foo.Bar.
Umm, this is wrong. You're telling observers that something has
happened that hasn't...
See:
<http://homepage.mac.com/mmalc/CocoaExamples/controllers.html>
"Batch import into an array, and other mass changes"
You want to do the inverse of adding (so you'll use
NSKeyValueChangeRemoval etc.)...
mmalc
_______________________________________________
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