• 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
Two TreeControllers, one ArrayController and the ContentSet binding...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Two TreeControllers, one ArrayController and the ContentSet binding...


  • Subject: Two TreeControllers, one ArrayController and the ContentSet binding...
  • From: Kam Dahin <email@hidden>
  • Date: Mon, 16 Oct 2006 16:34:33 -0700

Hello all,

I have a CoreData application that has two NSOutlineViews and one NSTableView. Each OutlineView has a TreeController to manage the specific data for that OutlineView and the TableView has an NSArrayController to manage it's data.

I have a Node entity that knows about subnodes (or children if you prefer) and their related contents. The two different OutlineView's TreeControllers are managing subclasses of this Node entity. The NSArrayController is managing another entity that represents the To- Many relationship for a given Node's contents.

What I am trying to do is have the content of the ArrayController change based on the selected node in the TreeControllers. This isn't a problem with one TreeController, but since I have two, I am running into trouble and I was hoping someone could help me out.

My initial idea was to use an NSMutableSet in my main controller class and then have the selection of the node load the data I need into the MutableSet. I could then have the NSArrayControllers "contentSet" binding set to manage the data in the MutableSet. I have done something similar to this in a different non-CoreData project but was wondering if any of you had a better way to handle this?

Since I am using CoreData, I figure there must be a way to ask the ManagedObjectContext for the information I need when the selection changes, but I am not sure how to do this and what the bindings setup would be. If someone could point me in the right direction, or verify that the idea for using the MuableSet in my main controller class is a good one, I would really appreciate it. I am still learning CoreData, and so I am sure there are tricks I just don't know about yet.

Regards,

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


  • Follow-Ups:
    • Re: Two TreeControllers, one ArrayController and the ContentSet binding...
      • From: Scott Stevenson <email@hidden>
  • Prev by Date: Re: playing a quicktime movie in a QTMovieView
  • Next by Date: Re: Re: playing a quicktime movie in a QTMovieView
  • Previous by thread: Re: playing a quicktime movie in a QTMovieView
  • Next by thread: Re: Two TreeControllers, one ArrayController and the ContentSet binding...
  • Index(es):
    • Date
    • Thread