Thanks all for the helpful comments and insights.

-koko

On Sep 9, 2010, at 10:42 AM, Kyle Sluder wrote:

On Sep 9, 2010, at 7:59 AM, k...@highrolls.net 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to