• 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: NSTableView: tableView:objectValueForTableColumn:row called more than necessary when scrolling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView: tableView:objectValueForTableColumn:row called more than necessary when scrolling


  • Subject: Re: NSTableView: tableView:objectValueForTableColumn:row called more than necessary when scrolling
  • From: John Stiles <email@hidden>
  • Date: Wed, 16 Jan 2008 17:11:52 -0800

It seems like you might be able to write a once-off class which acted as a simple data-source cache, keeping track of the last few requests so they can be re-provided as necessary, and then use that anywhere you needed it.


Hamish Allan wrote:
Hi Ben,

I suspect the designers of NSTableView decided to save themselves
having to cache values for the currently-selected row (which would
later be needed to redraw that row unhighlighted) and in doing so
doomed the rest of us to have to write such code in every single
datasource.

Hamish

On Jan 16, 2008 10:07 PM, Ben Chen <email@hidden> wrote:
Hi everyone,

I just found that when scrolling a NSTableView inside a NSScrollView
one row at a time, each time the tableview will not only ask the data
source for the new row's value but also ask for the last row's. So if
you scroll the table all the way donw, eventually it makes twice calls
as the number of rows in the table.

I been programming a app that performance of the table view is vital,
so I really want the table view call the data source as few as
possible. Does anyone know a solution?

Thanks,
Ben
_______________________________________________

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

_______________________________________________

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
_______________________________________________

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: 
 >NSTableView: tableView:objectValueForTableColumn:row called more than necessary when scrolling (From: "Ben Chen" <email@hidden>)
 >Re: NSTableView: tableView:objectValueForTableColumn:row called more than necessary when scrolling (From: "Hamish Allan" <email@hidden>)

  • Prev by Date: Re: NSLog broken after call of NSTask and setStandardError
  • Next by Date: Re: NSLog broken after call of NSTask and setStandardError
  • Previous by thread: Re: NSTableView: tableView:objectValueForTableColumn:row called more than necessary when scrolling
  • Next by thread: Re: NSTableView: tableView:objectValueForTableColumn:row called more than necessary when scrolling
  • Index(es):
    • Date
    • Thread