Re: [More Questions ]Has anyone any experience with NSTableView and NSArrayController ?
Re: [More Questions ]Has anyone any experience with NSTableView and NSArrayController ?
- Subject: Re: [More Questions ]Has anyone any experience with NSTableView and NSArrayController ?
- From: Scott Stevenson <email@hidden>
- Date: Tue, 29 Nov 2005 15:23:15 -0800
On Nov 29, 2005, at 3:02 PM, Alexander Hartner wrote:
What are the major differences between :
1.) [[self mutableArrayValueForKey:@"array"] addObjects:someObjects]
and
2.) [contactTableController addObject:contact];
I would image the 2nd option to be slightly quicker as it
accesses / notifies the controller directly, rather then access the
array via KVC. What my question really boils down to is what is
wrong with the second option or is it acceptable ?
Assuming you mean the second would be called many times inside a
loop, it can be much, much slower than the first option. Adding
objects as a batch allows coallescing to take place.
I don't see any particular advantage in using option 2 unless you're
calling it from within a subclass of NSArrayController.
- Scott
--
http://theocacao.com/
_______________________________________________
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