Re: Inserting objects in content array
Re: Inserting objects in content array
- Subject: Re: Inserting objects in content array
- From: Scott Anguish <email@hidden>
- Date: Wed, 12 May 2004 17:23:57 -0400
On May 12, 2004, at 3:45 PM, Don Rainwater wrote:
I have an application that retrieves records from a database, then
stuffs them into an array that is managed by an NSArrayController.
Currently, I put all of the returned records into the array myself,
then call [arrayController rearrangeObjects] to have the updated
content array displayed. This seems to be working fine, but would it
be better/faster to use [arrayController addObject:aRecord] instead?
addObject: automatically (at least by default) also changes the
current selection. This can trigger a number of KVO operations that you
may not require.
if you switch to that, you should turn off the automatic selection
during the insert (this is in the latest reference for
NSArrayController BTW).
you may be able to improve things by implementing the indexed
accessors on the object that contains the array itself.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.