• 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: Stéphane <email@hidden>
  • Date: Tue, 5 Feb 2008 16:21:38 +0100


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


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

  • Prev by Date: Re: PDFAnnotationLine problem
  • Next by Date: Re: receiving a file on app startup
  • Previous by thread: NSOutlineView and reload
  • Next by thread: Re: NSOutlineView and reload
  • Index(es):
    • Date
    • Thread