Now I feel stupid.

For efficiency, my code was caching the values for the second column, but I never cleared that cache before trying to refresh that column. The browser was refreshing the (now incorrect) cached values - clearing my cache out so that it was rebuilt fixed my issue.


Sorry for any confusion!


On 3/7/2015 12:39, Frank D. Engel, Jr. wrote:
I have an NSBrowser class which has at most two columns; it is populated from a core data store.

If I delete an object from the core data store that is from the first column of the browser, I can send loadColumnZero to the browser object, and it correctly refreshes the column and deselects everything.

I cannot, however, find a programmatic way to correctly refresh the second column (column number 1) when I delete something from there.

If I try loadColumnZero, then reselect the item in the first column, the second column shows a blank entry in the second column where the old object was.

If I select a different item in the first column, then reselect the one that would show the deleted item, then it refreshes correctly; but if I programmatically do this within the method that performs the delete, it ends up showing the same thing as if I hadn't done the reload.

I have tried reloadColumn:1, reloadDataForRowIndexes..., and numerous combinations of these and other method calls, and no matter what I try I can't seem to get it to just refresh the column.

The only thing that comes close to doing what I want is to have it select a different item in the first column (selectRow:0 inColumn:0), which leaves it on the "wrong" item in the first column - when I then manually select the desired column, it does correctly reload.


What am I missing - how can I get it to just do the sensible thing and refresh the data in the second column?


This is getting frustrating, and I'm sure I must be missing something simple...?????


I'm on OS X 10.9.5 if that makes a difference.



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to