• 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
NSTableView data reload race condition?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableView data reload race condition?


  • Subject: NSTableView data reload race condition?
  • From: "Rafael K. Kobylinski" <email@hidden>
  • Date: Fri, 8 Mar 2002 20:26:18 +0100

Hi!

If I update my data source very fast several times in a row (and call reloadData after each update), the associated NSTableView will only display the first new row. The other rows remain hidden until I force a reload via the GUI, e.g. by changing the size of column.

I wonder if I have overlooked something or if this is just how it is implemented. In that case, I have currently no idea how a good workaround could look like. I would appreciate any help or clarification you could provide.

Details:

To update my data source, I have a loop in another process and use DO to call a method which updates it and calls reloadData. When I update the data source for the first time and call reloadData, then my numberOfRowsInTableView is called. After that I observed in gdb that the NSTableView starts calling tableView:objectValueForTableColumn:row:, but it seems that this is done asynchronously, because the data source will get updated before the series of calls to tableView:objectValueForTableColumn:row: is finished. NSTableView ignores my additional reloadData messages and noteNumberOfRowsChanged did not help here either. I end up with all the right data in my data source, and a NSTableView that does not reflect all the changes, but only the first one.

Regards,
--
Rafael K. Kobylinski Email: email@hidden
Institut f|r Informatik Tel. : ++ 49 89 289 22391
Technische Universitdt M|nchen Cell.: ++ 49 177 7 495020
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: MT vs. Marshmallow
  • Next by Date: Re: MT vs. Marshmallow
  • Previous by thread: Re: Silly Newbie Question
  • Next by thread: Create a polygon region
  • Index(es):
    • Date
    • Thread