Populating NSBrowser (Cocoa OSX)
I want to create a widget that displays a column of selectable text data. It looks like NSBrowser is the best cocoa object for this, but I can't figure out how to populate the NSBrowser with any data. I guess I can set the string value of NsBrowserCell, but no where in the documentation can be found where to add a new cell to the column. Am I using the wrong object?
a source to share
It is necessary to define NSBrowserDelegate and define both ‑browser:willDisplayCell:atRow:column:
and ‑browser:numberOfRowsInColumn:
or method ‑browser:createRowsForColumn:inMatrix:
. This link is helpful:
http://www.cocoabuilder.com/archive/cocoa/31229-nsbrowser-question.html
a source to share