I have an NSTableView with two columns and a data source that fills it with data. That part works.
How do I get data (NSString format) out of the NSTableView? I can get the selected row but NSTableView doesn't seem to have methods for accessing data.
Getting the data from my data source seems to return useless data (type id and NSLog() and NSRunAlertPanel() both claim that the data isn't of the type NSString.
What's the easiest way to get data from an NSTableView?
Update:
Turns out the reason getting data from my data source fails has to do with the returning NSString being part of an NSArray in the tableView() method.
My input file contains lines which I split up for the columns in my table view. The NSTableView gets the correct data but when I call the tableView() method myself I run into a EXC_BAD_ACCESS error which I assume has to do with memory management.
Another update:
It wasn't memory management. It was my application's inability to identify the NSTableColumn it wanted. I wrote a second method to access data manually which uses an int for the column rather than a NSTableColumn and that worked.