NSTableView data reload race condition?
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.