• 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 stops updating.....
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSTableView stops updating..... (From: tarek <email@hidden>)
 >Re: NSTableView stops updating..... (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: NSTableView stops updating.....
  • Next by Date: CoreData / SQL hang on save
  • Previous by thread: Re: NSTableView stops updating.....
  • Next by thread: undo and NSTextField
  • Index(es):
    • Date
    • Thread