I want to make a widget that displays a column of selectable text data. It seems that the NSBrowser is the best cocoa object to do this but I cannot figure out how to populate the NSBrowser with any sort of data. I assume I can set the string value of an NsBrowserCell but no where in the documentation can I find where to add a new cell to a column. Am I using the wrong object?
+1
A:
One must define a NSBrowserDelegate and define both ‑browser:willDisplayCell:atRow:column:
and ‑browser:numberOfRowsInColumn:
or the method ‑browser:createRowsForColumn:inMatrix:
. This link is useful:
http://www.cocoabuilder.com/archive/cocoa/31229-nsbrowser-question.html
Mike2012
2010-04-28 23:25:35