• 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 -- Show all children
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTreeController -- Show all children


  • Subject: NSTreeController -- Show all children
  • From: Kam Dahin <email@hidden>
  • Date: Thu, 10 Aug 2006 13:11:03 -0700

Hi all,

I have been searching for an answer to this for a while and haven't been able to come up with anything solid. What I am trying to do seems simple enough, but is proving to be fairly hard, especially for someone with my limited Cocoa abilities.

I have an interface with a NSOutlineView bound to a NSTreeController on the left side and a NSTableView managed by an NSArrayController on the Right side.

When I select a node on my NSOutlineView, the children of that node are are displayed in the NSTableView, much like Mail or XCode. Pretty basic, and it is all working fine.

What I can't get working is being able to click on the root node in the Outline view and have the NSTableView show all the children, of every node, not just the children in the root node.

A little bit about my models:

I have a Node model that contains two arrays. One array contains the sub nodes for that particular node. The other array contains my Child model objects for the node. I am modeling a folder hierarchy and nodes/subnodes are equal to Directories, Child objects are equal to specific file types found in each directory.

Hopefully this all makes sense. Anyway, to restate the question, I was hoping that someone could point me in the right direction to get the root node to display all the children objects in the NSTableView? I thought about adding a second NSArray to my main controller that just contains all of the children objects and have the NSTableView display that when the root node is selected, but that seems like a bit of a hack. I have spent a lot of time trying to learn Bindings and have been able to get a great working interface, just need this last little bit to make it complete.

Thanks in advance...

k



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Creating an NSImage from a bitmap
  • Next by Date: Re: resolving aliases
  • Previous by thread: Re: Strange memory leak with AsyncSocket and multithreading
  • Next by thread: redrawing an NSPopUpButtonCell, and ghost effect
  • Index(es):
    • Date
    • Thread