• 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: NSOutlineView and reload
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOutlineView and reload


  • Subject: Re: NSOutlineView and reload
  • From: John Stiles <email@hidden>
  • Date: Tue, 05 Feb 2008 09:36:37 -0800

I've had the same problem as you, but I had pretty good success with deselecting the items and reselecting them after a reloadData call.
reloadItem calls might be deferred—not sure—but reloadData definitely is not deferred. It should happen immediately.



Alexander Cohen wrote:
This is what i though and im trying to do it, but after i call reload data, the view does not seem to get the new row count right away, it seems to wait until a refresh or something.

AC

On 5-Feb-08, at 10:21 AM, Stéphane wrote:


On Feb 5, 2008, at 3:37 PM, Alexander Cohen wrote:

When using an OutlineView, i've noticed that when i call reloadData or reloadItem and the new items are before the actual selection in the outlineView, the selection is not moved along with the selected item. What's the best way to keep my current selection in sync when i reload an OutlineView?

The selection is based on the row indexes.

So the only solution (maybe it's managed by bindings) is to:

- keep track of the objects that were selected based on the row indexes

- reloadData

- find the updated row indexes of the objects and update the selection


_______________________________________________

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

_______________________________________________

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
_______________________________________________

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: 
 >NSOutlineView and reload (From: Alexander Cohen <email@hidden>)
 >Re: NSOutlineView and reload (From: Stéphane <email@hidden>)
 >Re: NSOutlineView and reload (From: Alexander Cohen <email@hidden>)

  • Prev by Date: Re: Setting an NSColor crashes - probably very simple issue
  • Next by Date: Converting RTFD to HTML
  • Previous by thread: Re: NSOutlineView and reload
  • Next by thread: CoreData: Can't modify an immutable model
  • Index(es):
    • Date
    • Thread