I have a tree data structure which I would like to put into an NSBrowser. I have found complicated methods that involve App Delegates, but I would just like to insert the rows as I come across them.
+1
A:
An NSBrowser is a view. A view generally doesn't hold onto a whole complex tree of model objects—that's a controller's job. That's why you appoint your custom controller (and owner of your model objects) as the delegate of the browser: You own your entire model, and the view gets parts of it from you as it needs them.
Peter Hosey
2009-11-08 06:42:06