• 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: Alexander Cohen <email@hidden>
  • Date: Tue, 05 Feb 2008 10:54:08 -0500

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


  • Follow-Ups:
    • Re: NSOutlineView and reload
      • From: John Stiles <email@hidden>
References: 
 >NSOutlineView and reload (From: Alexander Cohen <email@hidden>)
 >Re: NSOutlineView and reload (From: Stéphane <email@hidden>)

  • Prev by Date: Re: CoreData: Can't modify an immutable model
  • Next by Date: Re: CoreData: Can't modify an immutable model
  • Previous by thread: Re: NSOutlineView and reload
  • Next by thread: Re: NSOutlineView and reload
  • Index(es):
    • Date
    • Thread