searchBar routine does not execute when text changes


Can anyone tell me why my searchBar routine does not execute when I change the text in the searchBar?
My program code is identical to the book, so I suspect I didn’t hook it up correctly in IB.
Here’s what my delegate looks like in IB:

countryTable x Table View
searchBar x Search Bar
window x window

Referencing Outlets
delegate x Files Owner

Thanks very much,
Bob B.


I was having the same problem. Comparing all the connections for MainWindow.xib between my implementation and the solutions version I noticed that I had set the Referencing Outlets for the App Delegate to be File’s Owner and Table View. I disconnected the Table View and made it Search Bar instead and everything works.

I think the problem is that in the make-these-connections figure in the book, the arrow that shows the delegate connection between the Search Bar and the App Delegate crosses through a dark patch on the Table View and so it looks like you should connect up the Table View rather than the Search Bar. Or at least that’s my excuse. :blush: