• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [More Questions ]Has anyone any experience with NSTableView and NSArrayController ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: [More Questions ]Has anyone any experience with NSTableView and NSArrayController ?
      • From: Scott Anguish <email@hidden>
References: 
 >[More Questions ]Has anyone any experience with NSTableView and NSArrayController ? (From: Alexander Hartner <email@hidden>)

  • Prev by Date: NSImageView + Text
  • Next by Date: NSButton draws unwanted white background on overlay window
  • Previous by thread: [More Questions ]Has anyone any experience with NSTableView and NSArrayController ?
  • Next by thread: Re: [More Questions ]Has anyone any experience with NSTableView and NSArrayController ?
  • Index(es):
    • Date
    • Thread