Thursday, February 10, 2011

Simply adding data to an NSBrowser?

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.

  • 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.

0 comments:

Post a Comment