Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Role of NSTreeController question



I have a situation that can be modeled using entities this way :


Conference <---------------->> Author <------------>> Report | | | Conf Controller Auth Controller Report Controller

NSArray controllers are associated with all three Entity types as shown. To provide data to an NSOutlineView, I intend to add an NSTreeController bound to the NSOutlineView.

My question is, am I right in assuming that the NSTreeController then replaces the NSArrayController associated with the Conference Entity? [Conference entities are always at the root level of the NSOutline] Or does the NSTreeController reference elements of the NSArrayController, meaning it needs the array controller for the Conference.

ie like this:

	Conf TreeController
		|
	Conference <---------------->> Author <------------>> Report
	       |				       |				|
	Conf Controller			Auth Controller		Report Controller



or this?:


Conference <---------------->> Author <------------>> Report | | | Conf TreeController Auth Controller Report Controller


The intention is to have the NSOutlineView display:

v Conference 1
	v Author 1
		report text
	v Author 2
		report text 2
v Conference 2
	v Author 2
		report text 3

I posted an earlier, vaguer question about hierarchies using NSOutline with NSTreeController. I hope this one will be easier to address.


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.