Re: NSOutlineView
Re: NSOutlineView
- Subject: Re: NSOutlineView
- From: Kyle Sluder <email@hidden>
- Date: Thu, 9 Sep 2010 09:42:49 -0700
On Sep 9, 2010, at 7:59 AM, email@hidden wrote:
> It is my understanding that an NSOutlineView is only 'populated' by using its Delegate Methods.
>
> My manager (a Windows guy with no Cocoa) claims the NSOutlineView can be directly manipulated as in add root, add child etc.
NSOutlineView does not have any methods for manipulating the tree of items displayed therein, because conceptually speaking it has no items. They belong to the datasource, and the outline view asks for them anew every time it needs to display a region of itself.
NSTreeController does offer some direct manipulation functionality, and its support for bindings will make it easy to use with NSOutlineView—that is until you run into one of the many infamous NSController bugs or limitations. But often you really want to make your changes to the model rather than the controller, particularly if your model is already in the same hierarchy you intend to display in the outline view. In that case your controller object mightn't need any hierarchy management of its own, rather only serving as a connection point between the model and view.
HTH,
--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