I must be doing something really silly; I’ve got this project working, except that the song titles don’t display in the tableView. Everything compiles and runs, with no errors in either the debugger, console, or during compile. The data are retrieved from the Apple site and the titles are shown in the log, as expected. But, for some reason the titles are not showing up in the table view. I’ve tried to carefully go line by line through the code in the chapter and what I’ve entered, and I don’t find any differences. I’ve also compared my code to that from the BigNerd Solution set, and don’t find any differences there either. I’ve also gone back and looked at the earlier list view chapters’ code and I haven’t found any problems compared to that code. Any suggestions about how to debug this and find out what’s going wrong and where? This isn’t a big deal, since I’ve learned something about XML parsing and web access from the Chapter. But, it would reduce the frustration level a little to find where I’ve made the mistake so I know where to look when this sort of problem shows up in future projects. TIA.
Are you sure there are no capitalization or spelling errors in your data source methods?
Joe, I did find one typo - left the “In” out of tableViews:numberOfRowsInSelection. However, fixing that doesn’t change the behavior. It’s acting like that method, along with the other tableView: method isn’t being called. I can put a breakpoint in both of the tableView:… methods and the debugger doesn’t hit either of them. So, it appears that they aren’t being called for some reason. As far as I can tell, they’re identical to the code in the BigNerdRanch version.
By the way, is there a “diff” function in the current XCode, e.g. 3.2, or is that something that’s coming in v 4.?
The name of that method is incorrect
It should be tableView:numberOfRowsInSection:, not selection.
Darn it, I’m at least twice blind. I’ve looked at that a dozen times without seeing. Thanks for the help.
But, it points out that when things like this fail, check the spelling and typos - in many cases the compiler finds them, but obviously not always.