Re: Refreshing of NSTableView with Snow Leopard

Trent Jacobs <[email protected]>
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
Thanks Kyle. I am observing for the event and I catch when it happens, and it's in this event handler that I would reload the tableview. I know (from debugging and analysis) that the order shown on the tableview is different to the order in the arraycontroller it's bound to. I'm really confused as to why calling reloadData isn't refreshing the table.

Your suggestion below is good and in hindsight would have been a good idea, but I'm not sure it would solve the refreshing issue?

On 4 Jan 2010, at 21:42, Kyle Sluder wrote:

> On Mon, Jan 4, 2010 at 1:17 PM, Trent Jacobs <[email protected]> wrote:
>> I'm having some trouble with refreshing my table views in Snow Leopard. I have a core data app with a NSTableView bound to a NSArrayController. In some situations the NSArrayController will get sorted externally and I need the table to refresh to show the new order.
> 
> Sounds like this resorting is not happening in a KVO-compliant manner.
> Also, if your data doesn't really have an intrinsic order, you should
> probably consider using a sort descriptor, or maybe moving your
> sorting logic to an NSArrayController subclass and implementing
> -arrangeObjects: accordingly, rather than sorting the array
> controller's content.
> 
> --Kyle Sluder
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.