• 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: NSBrowser Frustration
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBrowser Frustration


  • Subject: Re: NSBrowser Frustration
  • From: "Frank D. Engel, Jr." <email@hidden>
  • Date: Sat, 07 Mar 2015 16:12:54 -0500

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 (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


  • Prev by Date: disabling Apple Crash Reporter
  • Next by Date: Trying to create a 1px width NSBox
  • Previous by thread: Re: disabling Apple Crash Reporter
  • Next by thread: Trying to create a 1px width NSBox
  • Index(es):
    • Date
    • Thread