Re: NSTableView stops updating.....
Re: NSTableView stops updating.....
- Subject: Re: NSTableView stops updating.....
- From: Joar Wingfors <email@hidden>
- Date: Mon, 24 Aug 2009 21:17:03 -0700
On 24 aug 2009, at 21.00, Graham Cox wrote:
From that thread I call [tableView reloadData]
Try calling this on the main thread. I think reloadData marks the
table view as needing display, and that should be done on the main
thread.
[tableView performSelectorOnMainThread:@selector(reloadData)
withObject:nil waitUntilDone:NO];
Not only that, it seems very dangerous, if not outright unsafe, to
update the data source for the table view directly from a background
thread. Read more here:
<http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading
>
Don't miss the Cocoa thread safety summary at the end.
j o a r
_______________________________________________
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