Re: Updating NSTableView
Re: Updating NSTableView
- Subject: Re: Updating NSTableView
- From: "I. Savant" <email@hidden>
- Date: Wed, 13 May 2009 09:51:18 -0400
On Wed, May 13, 2009 at 9:43 AM, Michael Ash <email@hidden> wrote:
>> That would be difficult, hacky, and wrong. Why do you feel you need
>> to do this? What are you trying to accomplish?
>
> Actually it's trivial, correct, and documented. From the docs for
> frameOfCellAtColumn:row:
>
> You can use this method to update a single cell more efficiently than
> sending the table view a reloadData message.
>
> [aTableView setNeedsDisplayInRect:[aTableView
> frameOfCellAtColumn:column row:row]];
Well hell, Mike, I stand corrected! :-)
I've used -frameOfCellAtColumn:row: before to animate a widget
flying out from a clicked cell, but never read the discussion portion.
I had assumed (obviously incorrectly) that -reloadData would be needed
prior to -setNeedsDisplayInRect: in order for the cell to reflect a
new / changed value.
--
I.S.
_______________________________________________
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