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

Re: Bindings v. Datasource


  • Subject: Re: Bindings v. Datasource
  • From: Keary Suska <email@hidden>
  • Date: Mon, 27 Aug 2007 13:03:38 -0600
  • Thread-topic: Bindings v. Datasource

on 8/27/07 12:21 AM, email@hidden purportedly said:

<EDITED>
> If I datasource a tableview, only the rows that are scrolled into the
> visible area are actually called by Cocoa's view handling
>
> The bindings implementation seems to require that I construct the
> entire array not just the 'visible' ones.
</EDITED>
> 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?

I don't quite think so. I think that you can get the same behavior with
bindings by using indexed accessors and in particular the -get<Key>:range:
accessor method. I am not completely sure, but it may be worth a shot. Never
used it myself.

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

According to the data source docs, your data source methods are not supposed
to be expensive, so you already have a performance issue if your object
construction is expensive. I don't think it's bad to have a delay before a
window opens, providing informative progress indication is used. On the
other hand, if the memory usage will be extraordinary, a different approach
may be useful.

My 2ยข

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

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

References: 
 >Bindings v. Datasource (From: Steve Cronin <email@hidden>)

  • Prev by Date: Re: NSWindowDidChangeScreenProfileNotification not working
  • Next by Date: Re: How to track a lost mouseDown
  • Previous by thread: Bindings v. Datasource
  • Next by thread: NSWindowDidChangeScreenProfileNotification not working
  • Index(es):
    • Date
    • Thread