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

NSTreeController - Remove Children


  • Subject: NSTreeController - Remove Children
  • From: none given <email@hidden>
  • Date: Fri, 13 Feb 2009 15:49:58 -0800 (PST)

I have a NSTreeController with:
Node1
--- value1
--- value2
Node2
--- value1
--- value2
--- value3

With the following, I am able to remove a user selection:
 [treeController removeObjectsAtArrangedObjectIndexPaths:[treeController selectionIndexPaths]];

I cannot seem to find how to do this by code, that is, for example, remove from the tree all of Node2 children...

I tried with something like the following, but it only removes the node itself...

[treeController setSelectionIndexPath:[NSIndexPath indexPathWithIndex:1]];


How can I remove a node's children, while retaining the node itself?

Tia,

S.



_______________________________________________

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: Kyle Sluder <email@hidden>
  • Prev by Date: Re: NSTableView crash when selected.
  • Next by Date: Re: NSCollectionView inside an NSSplitView?
  • Previous by thread: Re: Images In Dock Menu?
  • Next by thread: Re: NSTreeController - Remove Children
  • Index(es):
    • Date
    • Thread