kiran Kumar Katuru
kiran Kumar Katuru

Reputation: 66

Data is not displayed in the table

I have created a small application,in which i have draged and droped a NSTableView onto the window and binded to an datasource, in the datasource i have created NSMutableArray and added 2 records to it. And also defined methods numberOfRowsInTableView and rest of the methods. When i run the application it is showing the rows but the data is not displaying.

Upvotes: 0

Views: 245

Answers (1)

Joshua Nozzi
Joshua Nozzi

Reputation: 61228

So. You've connected your table view's datasource outlet to some controller object that adopts NSTableDataSource protocol.

You mention numberOfRowsInTableView, which tells the table how many rows it should expect but lump together the "rest of the methods." One of those other methods is exactly responsible for showing the data for a given row and column.

What seems to be happening is this:

Table: "How many rows we got here?"

Data Source: "Three."

Table: "Gimme the object to display at row 0, column 0."

Data Source: [ sound of crickets chirping ]

You should probably post the exact code you're using for your implementation of the tableView:objectValueForTableColumn:row: method. Remember to include the method signature itself, given its importance in being recognized as the selector the protocol is looking for.

Upvotes: 1

Related Questions