I have NSTableViewwith two columns and a data source that populates it with data. This part works.
How to get (NSStringformat) data from NSTableView? I can get the selected row, but NSTableViewit seems to have no methods for accessing the data.
Getting data from my data source seems to return useless data (type identifiers and NSLog()both NSRunAlertPanel()claim that the data is not of type NSString.
What is the easiest way to get data from NSTableView?
Update:
It turns out that the reason the data from my data source fails is due to the return NSStringbeing part of NSArraythe method tableView().
My input file contains rows that I split for columns in my table view. NSTableViewgets the correct data, but when I call the method tableView(), I throw an EXC_BAD_ACCESS error, which I believe is related to memory management.
Another update:
This is not memory management. My inability to determine the identifier NSTableColumnthat he wanted. I wrote a second method to access the data manually, which uses int for the column, and not NSTableColumn, and it worked.
source
share