Problem with connecting the table view

I’ve made it up to the end of chapter 32, but I am faced with 2 issues. First of all the contents of the self.tasks array are not displayed in the Table View. Neither do my entered tasks end up in the array. It seems to me like there’s no connection. I followed the instructions in the book and double-checked, but I’m afraid I’m missing something.

File’s Owner connections are:
taskTable-Table View
Referencing Outlets
dataSource-Table View
Received Actions
addTask-Add Task

Table View connections are:
dataSource-File’s Owner
Referencing Outlets
taskTable-File’s Owner

I’m new to Objective-C, but made it this far (in the book) without any help, but now I’m stuck. What am I missing?

Secondly I haven’t got a clue how the tasks array in BNRDocument.h is “connected” to the Table View in Document.xib, but I guess both issues are connected somehow. In other words, how are:

@property (nonatomic) NSMutableArray *tasks; @property (nonatomic) IBOutlet NSTableView *taskTable;

Help is much appreciated!


Make sure that you are using a Cell Based TableView object.

There are some differences between Cell Based and View Based TableView objects.

[Become a competent programmer:]

Thanks again for helping me out.


It seems that I have the exact same issue. However, the hint regarding the different types of table views did not help me. Could somebody please clarify? I have the following issue: whenever I hit the “Add Task” button, I get a new row reading the default text (“Table View Cell”) instead of “New Item”. I can edit the new item. When I change, a plist file is created including the correct number of items - but they all read “Table View Cell” instead of whatever I input during editing the rows. There seems to be a misconnection.

Best regards,

Guys, I had the same issue.
Here’s how I solved the problem.
In your xib file, open the document outline and check the hierarchical list of your view objects (Window / View / Bordered Scroll View - Table View / Clip View / Table View/ Table Column / Table Cell View / Table View Cell // Text Cell). The problem is that the Table Cell View and Table View Cell are overlapping the Text Cell, which is where actually your tasks are displayed. So delete both Table Cell View and Table View Cell and everything will be fine.

kotyara 's answer is perfect!
thanks so much!
i intentionally register an account to thank you as I was stuck on this for so long.

Yes! kotyara’s reply solved the problem for me as well.

What an obscure solution, don’t know how he figured it out - I never would have!


I had the same problem but none of the solutions worked for me. What I did was go back to “Connecting the table view” and instead of Ctrl+Drag File’s Owner onto the layout grid, i dragged it to the Table View in the Document Explorer instead. Magically it all started working. I’m guessing that wherever i dragged it to originally was not the table view. It would be nice to have a “check this” section to see that whatever magic is happening behind the scenes for the authors also happened for me on my machine. I was able to right-click the Document Explorer and see that now it’s all appearing to be hooked up correctly but I don’t know what it looked like while I was having trouble.

And for the record, Xcode 6.4, i did not have the Table Cell View/Table View Cell nodes. I saw the screen shot about cell type and fixed that from the outset. I’m guessing something is probably just different in Xcode version from now (Aug 2015) and when the book was written. Ok since I’m really just trying to get my head around Obj-C right now.

[quote=“ibex10”]Make sure that you are using a Cell Based TableView object.

There are some differences between Cell Based and View Based TableView objects.

Thanks, I didn’t realise that view based tableview is selected by default.