On Jun 23, 2016, at 13:39 , Jonathan Mitchell <li...@mugginsoft.com> wrote:
> 
> Do you mean something like this?
> 
> NSMutableArray *proxy = [NSArrayController 
> mutableArrayValueForKey:@"content"];

That wasn’t what I had in mind. I meant that you would make the array a 
property of a real model object, and update *that* property, without referring 
to the array controller directly at all. If you do a KVO compliant update under 
those circumstances, the array controller will get a KVO notification and 
update its internal state automatically. You shouldn’t need to re-filter 
manually.

In theory, that allows the array controller to optimize what it does with the 
update. If you just add one object, it shouldn’t need to rescan everything in 
the array, or apply the filter predicate to anything except the object you 
added. (Caveat: it’s a black box, so we don’t know what it does, but we HOPE 
that it does this efficiently.)

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to