• 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: NSTreeController - Remove Children
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTreeController - Remove Children


  • Subject: Re: NSTreeController - Remove Children
  • From: Kyle Sluder <email@hidden>
  • Date: Sat, 14 Feb 2009 17:22:11 -0500

On Fri, Feb 13, 2009 at 6:49 PM, none given <email@hidden> wrote:
> I cannot seem to find how to do this by code, that is, for example, remove from the tree all of Node2 children...

NSTreeNode has a -childNodes method.  I'd use that to recursively
determine if each node has children, and then add those children to an
array of index paths to be deleted.  Then it's a matter of
-[NSTreeController removeObjectsAtArrangedObjectIndexPaths:].

--Kyle Sluder
_______________________________________________

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: NSTreeController - Remove Children
      • From: none given <email@hidden>
References: 
 >NSTreeController - Remove Children (From: none given <email@hidden>)

  • Prev by Date: Re: Can anyone suggest a way to do this?
  • Next by Date: CALayers Lost After Switching Window's ContentView
  • Previous by thread: NSTreeController - Remove Children
  • Next by thread: Re: NSTreeController - Remove Children
  • Index(es):
    • Date
    • Thread