• 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
Bindings v. Datasource
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bindings v. Datasource


  • Subject: Bindings v. Datasource
  • From: Steve Cronin <email@hidden>
  • Date: Mon, 27 Aug 2007 01:21:53 -0500

Folks;

I've been using bindings for tableviews and have been very pleased at the ease of making things 'just work'.
But I've run up against something that makes me think that using a datasource might be better in this case.
I'm hoping for comments from the wiser and more experienced ones.


The cool thing about datasources is how lazy they are.
If I datasource a tableview, only the rows that are scrolled into the visible area are actually called by Cocoa's view handling


Bindings don't appear to be as lazy.

I usually bind tableview columns to an array controller's arrangedObjects; setting the value for each column.
The Array Controller usually has its contentArray defined by bindings back to a windowController or appDelegate.
The bindings implementation seems to require that I construct the entire array not just the 'visible' ones.


So the case I've run up against: the rows are quite expensive to construct {NSData and NSImage handling}.
Since I seem forced to load the whole array it is slow to open a particular window.


SO  my questions:

1) are the above statements correct or am I not fully informed?

2) do others agree that this is a good case for NOT using bindings and using a datasource instead?

Thank-you for any follow-ups!
Steve

_______________________________________________

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


  • Follow-Ups:
    • Re: Bindings v. Datasource
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: Calling a setter from setObjectValue causes crash in NSCell subclass
  • Next by Date: Re: Objects disappear while encoding
  • Previous by thread: [ANN] ArtistKit v1.1
  • Next by thread: Re: Bindings v. Datasource
  • Index(es):
    • Date
    • Thread