Re: Loading saved file into NSArrayController
Re: Loading saved file into NSArrayController
- Subject: Re: Loading saved file into NSArrayController
- From: mmalc crawford <email@hidden>
- Date: Mon, 18 Feb 2008 12:24:45 -0800
On Feb 18, 2008, at 1:26 AM, Hans van der Meer wrote:
It might be of use to remember that changes within an
NSMutableArray (addObject, remove...) do not by themselves lead
tot calling the class's observers. I found it useful to bracket
the changes in this manner:
[self willChangeValueForKey:@"theArray"];
// changes to the contents of the array
[self didChangeValueForKey:@"theArray"];
Don't do this.
RTFineM.
Please forgive me my ignorance. But I do not understand why the
change bracketing should not be done.
Because it says the whole array has changed, not the specific elements.
It's very inefficient.
For batch operations, see e.g <http://homepage.mac.com/mmalc/CocoaExamples/controllers.html
>
mmalc
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden