I am not getting any results in UITableView


#1

I have gone through all of my code 3 times and cannot see anything wrong.

Here is a printout of all of the NSLog’s, so I know that I am reading and parsing.

Can anyone see anything wrong? I am really frustrated, I have been stuck here for 2 days now and I don’t want to move on until I get this working.

Any help would be appreciated. Thanks.

2012-05-30 14:47:39.911 Nerdfeed[1498:f803] <ListViewController: 0x685cd50> Found a rss element
2012-05-30 14:47:39.914 Nerdfeed[1498:f803] <ListViewController: 0x685cd50> Found a channel element
2012-05-30 14:47:39.915 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a title element
2012-05-30 14:47:39.916 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a description element
2012-05-30 14:47:39.917 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a link element
2012-05-30 14:47:39.918 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a lastBuildDate element
2012-05-30 14:47:39.918 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a generator element
2012-05-30 14:47:39.919 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a atom:link element
2012-05-30 14:47:39.920 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a image element
2012-05-30 14:47:39.921 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a url element
2012-05-30 14:47:39.921 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a title element
2012-05-30 14:47:39.922 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a link element
2012-05-30 14:47:39.923 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a description element
2012-05-30 14:47:39.942 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a language element
2012-05-30 14:47:39.942 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a pubDate element
2012-05-30 14:47:39.943 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a ttl element
2012-05-30 14:47:39.943 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a item element
2012-05-30 14:47:39.944 Nerdfeed[1498:f803] <RSSItem: 0x6a42d90> found a title element
2012-05-30 14:47:39.947 Nerdfeed[1498:f803] <RSSItem: 0x6a42d90> found a link element
2012-05-30 14:47:39.948 Nerdfeed[1498:f803] <RSSItem: 0x6a42d90> found a description element
2012-05-30 14:47:39.949 Nerdfeed[1498:f803] <RSSItem: 0x6a42d90> found a author element
2012-05-30 14:47:39.949 Nerdfeed[1498:f803] <RSSItem: 0x6a42d90> found a category element
2012-05-30 14:47:39.950 Nerdfeed[1498:f803] <RSSItem: 0x6a42d90> found a comments element
2012-05-30 14:47:39.950 Nerdfeed[1498:f803] <RSSItem: 0x6a42d90> found a pubDate element
2012-05-30 14:47:39.951 Nerdfeed[1498:f803] <RSSItem: 0x6a42d90> found a guid element
2012-05-30 14:47:39.952 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a item element
2012-05-30 14:47:39.952 Nerdfeed[1498:f803] <RSSItem: 0x6a44cc0> found a title element
2012-05-30 14:47:39.953 Nerdfeed[1498:f803] <RSSItem: 0x6a44cc0> found a link element
2012-05-30 14:47:39.953 Nerdfeed[1498:f803] <RSSItem: 0x6a44cc0> found a description element
2012-05-30 14:47:39.954 Nerdfeed[1498:f803] <RSSItem: 0x6a44cc0> found a author element
2012-05-30 14:47:39.955 Nerdfeed[1498:f803] <RSSItem: 0x6a44cc0> found a category element
2012-05-30 14:47:39.955 Nerdfeed[1498:f803] <RSSItem: 0x6a44cc0> found a comments element
2012-05-30 14:47:39.956 Nerdfeed[1498:f803] <RSSItem: 0x6a44cc0> found a pubDate element
2012-05-30 14:47:39.956 Nerdfeed[1498:f803] <RSSItem: 0x6a44cc0> found a guid element
2012-05-30 14:47:39.957 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a item element
2012-05-30 14:47:39.957 Nerdfeed[1498:f803] <RSSItem: 0x6a44ce0> found a title element
2012-05-30 14:47:39.958 Nerdfeed[1498:f803] <RSSItem: 0x6a44ce0> found a link element
2012-05-30 14:47:39.958 Nerdfeed[1498:f803] <RSSItem: 0x6a44ce0> found a description element
2012-05-30 14:47:39.959 Nerdfeed[1498:f803] <RSSItem: 0x6a44ce0> found a author element
2012-05-30 14:47:39.959 Nerdfeed[1498:f803] <RSSItem: 0x6a44ce0> found a category element
2012-05-30 14:47:39.960 Nerdfeed[1498:f803] <RSSItem: 0x6a44ce0> found a comments element
2012-05-30 14:47:39.960 Nerdfeed[1498:f803] <RSSItem: 0x6a44ce0> found a pubDate element
2012-05-30 14:47:39.961 Nerdfeed[1498:f803] <RSSItem: 0x6a44ce0> found a guid element
2012-05-30 14:47:39.961 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a item element
2012-05-30 14:47:39.962 Nerdfeed[1498:f803] <RSSItem: 0x6b40c80> found a title element
2012-05-30 14:47:39.962 Nerdfeed[1498:f803] <RSSItem: 0x6b40c80> found a link element
2012-05-30 14:47:39.963 Nerdfeed[1498:f803] <RSSItem: 0x6b40c80> found a description element
2012-05-30 14:47:39.963 Nerdfeed[1498:f803] <RSSItem: 0x6b40c80> found a author element
2012-05-30 14:47:39.964 Nerdfeed[1498:f803] <RSSItem: 0x6b40c80> found a category element
2012-05-30 14:47:39.964 Nerdfeed[1498:f803] <RSSItem: 0x6b40c80> found a comments element
2012-05-30 14:47:39.964 Nerdfeed[1498:f803] <RSSItem: 0x6b40c80> found a pubDate element
2012-05-30 14:47:39.965 Nerdfeed[1498:f803] <RSSItem: 0x6b40c80> found a guid element
2012-05-30 14:47:39.965 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a item element
2012-05-30 14:47:39.966 Nerdfeed[1498:f803] <RSSItem: 0x6a45470> found a title element
2012-05-30 14:47:39.966 Nerdfeed[1498:f803] <RSSItem: 0x6a45470> found a link element
2012-05-30 14:47:39.967 Nerdfeed[1498:f803] <RSSItem: 0x6a45470> found a description element
2012-05-30 14:47:39.967 Nerdfeed[1498:f803] <RSSItem: 0x6a45470> found a author element
2012-05-30 14:47:39.968 Nerdfeed[1498:f803] <RSSItem: 0x6a45470> found a category element
2012-05-30 14:47:39.968 Nerdfeed[1498:f803] <RSSItem: 0x6a45470> found a comments element
2012-05-30 14:47:39.969 Nerdfeed[1498:f803] <RSSItem: 0x6a45470> found a pubDate element
2012-05-30 14:47:39.969 Nerdfeed[1498:f803] <RSSItem: 0x6a45470> found a guid element
2012-05-30 14:47:39.969 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a item element
2012-05-30 14:47:39.970 Nerdfeed[1498:f803] <RSSItem: 0x6b3c5c0> found a title element
2012-05-30 14:47:39.970 Nerdfeed[1498:f803] <RSSItem: 0x6b3c5c0> found a link element
2012-05-30 14:47:39.971 Nerdfeed[1498:f803] <RSSItem: 0x6b3c5c0> found a description element
2012-05-30 14:47:39.971 Nerdfeed[1498:f803] <RSSItem: 0x6b3c5c0> found a author element
2012-05-30 14:47:39.986 Nerdfeed[1498:f803] <RSSItem: 0x6b3c5c0> found a category element
2012-05-30 14:47:39.987 Nerdfeed[1498:f803] <RSSItem: 0x6b3c5c0> found a comments element
2012-05-30 14:47:39.987 Nerdfeed[1498:f803] <RSSItem: 0x6b3c5c0> found a pubDate element
2012-05-30 14:47:39.988 Nerdfeed[1498:f803] <RSSItem: 0x6b3c5c0> found a guid element
2012-05-30 14:47:39.988 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a item element
2012-05-30 14:47:39.989 Nerdfeed[1498:f803] <RSSItem: 0x6e3b640> found a title element
2012-05-30 14:47:39.989 Nerdfeed[1498:f803] <RSSItem: 0x6e3b640> found a link element
2012-05-30 14:47:39.990 Nerdfeed[1498:f803] <RSSItem: 0x6e3b640> found a description element
2012-05-30 14:47:39.990 Nerdfeed[1498:f803] <RSSItem: 0x6e3b640> found a author element
2012-05-30 14:47:39.991 Nerdfeed[1498:f803] <RSSItem: 0x6e3b640> found a category element
2012-05-30 14:47:39.991 Nerdfeed[1498:f803] <RSSItem: 0x6e3b640> found a comments element
2012-05-30 14:47:39.992 Nerdfeed[1498:f803] <RSSItem: 0x6e3b640> found a pubDate element
2012-05-30 14:47:39.992 Nerdfeed[1498:f803] <RSSItem: 0x6e3b640> found a guid element
2012-05-30 14:47:39.993 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a item element
2012-05-30 14:47:39.993 Nerdfeed[1498:f803] <RSSItem: 0x6e3e2a0> found a title element
2012-05-30 14:47:39.993 Nerdfeed[1498:f803] <RSSItem: 0x6e3e2a0> found a link element
2012-05-30 14:47:39.994 Nerdfeed[1498:f803] <RSSItem: 0x6e3e2a0> found a description element
2012-05-30 14:47:39.994 Nerdfeed[1498:f803] <RSSItem: 0x6e3e2a0> found a author element
2012-05-30 14:47:39.995 Nerdfeed[1498:f803] <RSSItem: 0x6e3e2a0> found a category element
2012-05-30 14:47:39.995 Nerdfeed[1498:f803] <RSSItem: 0x6e3e2a0> found a comments element
2012-05-30 14:47:39.996 Nerdfeed[1498:f803] <RSSItem: 0x6e3e2a0> found a pubDate element
2012-05-30 14:47:39.996 Nerdfeed[1498:f803] <RSSItem: 0x6e3e2a0> found a guid element
2012-05-30 14:47:39.997 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a item element
2012-05-30 14:47:39.997 Nerdfeed[1498:f803] <RSSItem: 0x686c1e0> found a title element
2012-05-30 14:47:39.998 Nerdfeed[1498:f803] <RSSItem: 0x686c1e0> found a link element
2012-05-30 14:47:39.998 Nerdfeed[1498:f803] <RSSItem: 0x686c1e0> found a description element
2012-05-30 14:47:39.999 Nerdfeed[1498:f803] <RSSItem: 0x686c1e0> found a author element
2012-05-30 14:47:39.999 Nerdfeed[1498:f803] <RSSItem: 0x686c1e0> found a category element
2012-05-30 14:47:39.999 Nerdfeed[1498:f803] <RSSItem: 0x686c1e0> found a comments element
2012-05-30 14:47:40.000 Nerdfeed[1498:f803] <RSSItem: 0x686c1e0> found a pubDate element
2012-05-30 14:47:40.000 Nerdfeed[1498:f803] <RSSItem: 0x686c1e0> found a guid element
2012-05-30 14:47:40.001 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a item element
2012-05-30 14:47:40.001 Nerdfeed[1498:f803] <RSSItem: 0x6a44980> found a title element
2012-05-30 14:47:40.002 Nerdfeed[1498:f803] <RSSItem: 0x6a44980> found a link element
2012-05-30 14:47:40.002 Nerdfeed[1498:f803] <RSSItem: 0x6a44980> found a description element
2012-05-30 14:47:40.003 Nerdfeed[1498:f803] <RSSItem: 0x6a44980> found a author element
2012-05-30 14:47:40.003 Nerdfeed[1498:f803] <RSSItem: 0x6a44980> found a category element
2012-05-30 14:47:40.004 Nerdfeed[1498:f803] <RSSItem: 0x6a44980> found a comments element
2012-05-30 14:47:40.004 Nerdfeed[1498:f803] <RSSItem: 0x6a44980> found a pubDate element
2012-05-30 14:47:40.005 Nerdfeed[1498:f803] <RSSItem: 0x6a44980> found a guid element
2012-05-30 14:47:40.005 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a item element
2012-05-30 14:47:40.006 Nerdfeed[1498:f803] <RSSItem: 0x6e60bc0> found a title element
2012-05-30 14:47:40.006 Nerdfeed[1498:f803] <RSSItem: 0x6e60bc0> found a link element
2012-05-30 14:47:40.007 Nerdfeed[1498:f803] <RSSItem: 0x6e60bc0> found a description element
2012-05-30 14:47:40.007 Nerdfeed[1498:f803] <RSSItem: 0x6e60bc0> found a author element
2012-05-30 14:47:40.008 Nerdfeed[1498:f803] <RSSItem: 0x6e60bc0> found a category element
2012-05-30 14:47:40.008 Nerdfeed[1498:f803] <RSSItem: 0x6e60bc0> found a comments element
2012-05-30 14:47:40.009 Nerdfeed[1498:f803] <RSSItem: 0x6e60bc0> found a pubDate element
2012-05-30 14:47:40.009 Nerdfeed[1498:f803] <RSSItem: 0x6e60bc0> found a guid element
2012-05-30 14:47:40.010 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a item element
2012-05-30 14:47:40.010 Nerdfeed[1498:f803] <RSSItem: 0x686c030> found a title element
2012-05-30 14:47:40.011 Nerdfeed[1498:f803] <RSSItem: 0x686c030> found a link element
2012-05-30 14:47:40.011 Nerdfeed[1498:f803] <RSSItem: 0x686c030> found a description element
2012-05-30 14:47:40.011 Nerdfeed[1498:f803] <RSSItem: 0x686c030> found a author element
2012-05-30 14:47:40.012 Nerdfeed[1498:f803] <RSSItem: 0x686c030> found a category element
2012-05-30 14:47:40.012 Nerdfeed[1498:f803] <RSSItem: 0x686c030> found a comments element
2012-05-30 14:47:40.013 Nerdfeed[1498:f803] <RSSItem: 0x686c030> found a pubDate element
2012-05-30 14:47:40.013 Nerdfeed[1498:f803] <RSSItem: 0x686c030> found a guid element
2012-05-30 14:47:40.014 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a item element
2012-05-30 14:47:40.014 Nerdfeed[1498:f803] <RSSItem: 0x686c670> found a title element
2012-05-30 14:47:40.015 Nerdfeed[1498:f803] <RSSItem: 0x686c670> found a link element
2012-05-30 14:47:40.015 Nerdfeed[1498:f803] <RSSItem: 0x686c670> found a description element
2012-05-30 14:47:40.018 Nerdfeed[1498:f803] <RSSItem: 0x686c670> found a author element
2012-05-30 14:47:40.019 Nerdfeed[1498:f803] <RSSItem: 0x686c670> found a category element
2012-05-30 14:47:40.019 Nerdfeed[1498:f803] <RSSItem: 0x686c670> found a comments element
2012-05-30 14:47:40.020 Nerdfeed[1498:f803] <RSSItem: 0x686c670> found a pubDate element
2012-05-30 14:47:40.021 Nerdfeed[1498:f803] <RSSItem: 0x686c670> found a guid element
2012-05-30 14:47:40.021 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a item element
2012-05-30 14:47:40.022 Nerdfeed[1498:f803] <RSSItem: 0xe53a820> found a title element
2012-05-30 14:47:40.022 Nerdfeed[1498:f803] <RSSItem: 0xe53a820> found a link element
2012-05-30 14:47:40.023 Nerdfeed[1498:f803] <RSSItem: 0xe53a820> found a description element
2012-05-30 14:47:40.023 Nerdfeed[1498:f803] <RSSItem: 0xe53a820> found a author element
2012-05-30 14:47:40.024 Nerdfeed[1498:f803] <RSSItem: 0xe53a820> found a category element
2012-05-30 14:47:40.024 Nerdfeed[1498:f803] <RSSItem: 0xe53a820> found a comments element
2012-05-30 14:47:40.025 Nerdfeed[1498:f803] <RSSItem: 0xe53a820> found a pubDate element
2012-05-30 14:47:40.025 Nerdfeed[1498:f803] <RSSItem: 0xe53a820> found a guid element
2012-05-30 14:47:40.026 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a item element
2012-05-30 14:47:40.026 Nerdfeed[1498:f803] <RSSItem: 0x6a44bc0> found a title element
2012-05-30 14:47:40.027 Nerdfeed[1498:f803] <RSSItem: 0x6a44bc0> found a link element
2012-05-30 14:47:40.027 Nerdfeed[1498:f803] <RSSItem: 0x6a44bc0> found a description element
2012-05-30 14:47:40.028 Nerdfeed[1498:f803] <RSSItem: 0x6a44bc0> found a author element
2012-05-30 14:47:40.028 Nerdfeed[1498:f803] <RSSItem: 0x6a44bc0> found a category element
2012-05-30 14:47:40.029 Nerdfeed[1498:f803] <RSSItem: 0x6a44bc0> found a comments element
2012-05-30 14:47:40.029 Nerdfeed[1498:f803] <RSSItem: 0x6a44bc0> found a pubDate element
2012-05-30 14:47:40.030 Nerdfeed[1498:f803] <RSSItem: 0x6a44bc0> found a guid element
2012-05-30 14:47:40.030 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a item element
2012-05-30 14:47:40.031 Nerdfeed[1498:f803] <RSSItem: 0x686c070> found a title element
2012-05-30 14:47:40.031 Nerdfeed[1498:f803] <RSSItem: 0x686c070> found a link element
2012-05-30 14:47:40.032 Nerdfeed[1498:f803] <RSSItem: 0x686c070> found a description element
2012-05-30 14:47:40.032 Nerdfeed[1498:f803] <RSSItem: 0x686c070> found a author element
2012-05-30 14:47:40.033 Nerdfeed[1498:f803] <RSSItem: 0x686c070> found a category element
2012-05-30 14:47:40.033 Nerdfeed[1498:f803] <RSSItem: 0x686c070> found a comments element
2012-05-30 14:47:40.034 Nerdfeed[1498:f803] <RSSItem: 0x686c070> found a pubDate element
2012-05-30 14:47:40.034 Nerdfeed[1498:f803] <RSSItem: 0x686c070> found a guid element
2012-05-30 14:47:40.035 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a item element
2012-05-30 14:47:40.035 Nerdfeed[1498:f803] <RSSItem: 0x6b42bb0> found a title element
2012-05-30 14:47:40.036 Nerdfeed[1498:f803] <RSSItem: 0x6b42bb0> found a link element
2012-05-30 14:47:40.036 Nerdfeed[1498:f803] <RSSItem: 0x6b42bb0> found a description element
2012-05-30 14:47:40.036 Nerdfeed[1498:f803] <RSSItem: 0x6b42bb0> found a author element
2012-05-30 14:47:40.037 Nerdfeed[1498:f803] <RSSItem: 0x6b42bb0> found a category element
2012-05-30 14:47:40.037 Nerdfeed[1498:f803] <RSSItem: 0x6b42bb0> found a comments element
2012-05-30 14:47:40.038 Nerdfeed[1498:f803] <RSSItem: 0x6b42bb0> found a pubDate element
2012-05-30 14:47:40.038 Nerdfeed[1498:f803] <RSSItem: 0x6b42bb0> found a guid element
2012-05-30 14:47:40.039 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a item element
2012-05-30 14:47:40.039 Nerdfeed[1498:f803] <RSSItem: 0x6b502c0> found a title element
2012-05-30 14:47:40.040 Nerdfeed[1498:f803] <RSSItem: 0x6b502c0> found a link element
2012-05-30 14:47:40.040 Nerdfeed[1498:f803] <RSSItem: 0x6b502c0> found a description element
2012-05-30 14:47:40.040 Nerdfeed[1498:f803] <RSSItem: 0x6b502c0> found a author element
2012-05-30 14:47:40.041 Nerdfeed[1498:f803] <RSSItem: 0x6b502c0> found a category element
2012-05-30 14:47:40.041 Nerdfeed[1498:f803] <RSSItem: 0x6b502c0> found a comments element
2012-05-30 14:47:40.051 Nerdfeed[1498:f803] <RSSItem: 0x6b502c0> found a pubDate element
2012-05-30 14:47:40.052 Nerdfeed[1498:f803] <RSSItem: 0x6b502c0> found a guid element
2012-05-30 14:47:40.052 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0> found a item element
2012-05-30 14:47:40.053 Nerdfeed[1498:f803] <RSSItem: 0x686c1a0> found a title element
2012-05-30 14:47:40.053 Nerdfeed[1498:f803] <RSSItem: 0x686c1a0> found a link element
2012-05-30 14:47:40.053 Nerdfeed[1498:f803] <RSSItem: 0x686c1a0> found a description element
2012-05-30 14:47:40.054 Nerdfeed[1498:f803] <RSSItem: 0x686c1a0> found a author element
2012-05-30 14:47:40.054 Nerdfeed[1498:f803] <RSSItem: 0x686c1a0> found a category element
2012-05-30 14:47:40.055 Nerdfeed[1498:f803] <RSSItem: 0x686c1a0> found a comments element
2012-05-30 14:47:40.055 Nerdfeed[1498:f803] <RSSItem: 0x686c1a0> found a pubDate element
2012-05-30 14:47:40.056 Nerdfeed[1498:f803] <RSSItem: 0x686c1a0> found a guid element
2012-05-30 14:47:40.057 Nerdfeed[1498:f803] <RSSChannel: 0x6a44dd0>
(null)
(null)


#2

Are you reloading the data when the connection finishes loading? Check the - (void)connectionDidFinishLoading:(NSURLConnection *)conn code on p. 452 in the 3rd edition of the book. At the bottom, there is [[self tableView] reloadData];

Also, make sure you are instantiating items, from - (id)init on p.450. Breakpoint that line of code to make sure it’s being called.

Edit: It seems that your [channel title] and [channel infoString] are nil, as evident by the 2 (null)s at the end of your log. So make sure those are getting set correctly in - (void)parser:didStartElement:… on p.451


#3

[quote=“christian”]Are you reloading the data when the connection finishes loading? Check the - (void)connectionDidFinishLoading:(NSURLConnection *)conn code on p. 452 in the 3rd edition of the book. At the bottom, there is [[self tableView] reloadData];

Also, make sure you are instantiating items, from - (id)init on p.450. Breakpoint that line of code to make sure it’s being called.

Edit: It seems that your [channel title] and [channel infoString] are nil, as evident by the 2 (null)s at the end of your log. So make sure those are getting set correctly in - (void)parser:didStartElement:… on p.451[/quote]

OK, so I checked the reloadData and that looks good.

My RSSChannel’s init is instantiating items, I checked that via a breakpoint.

And here is my RSSChannel didStartElement, which I put some breakpoints in and its is getting called, still no results. I appreciate you helping me! Thank you, I really hope I can resolve this as it is frustrating the heck out of me:

-(void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict;
{
NSLog(@"\t\t%@ found a %@ element",self,elementName);

if ([elementName isEqual:@"title"]) {
    currentString=[[NSMutableString alloc]init];
    
    [self setTitle:currentString];
}
else if ([elementName isEqual:@"description"]) {
    currentString=[[NSMutableString alloc]init];
    
    [self setInfoString:currentString];
}
else if ([elementName isEqual:@"item"]) {
    RSSItem *entry=[[RSSItem alloc]init];
    
    [entry setParentParserDelegate:self];
    
    [parser setDelegate:entry];
    
    [items addObject:entry];
    
    
    
    
    
    
}

}


#4

I just tried something else, I wanted to see what was going on with currentString when we added values, so I added the following code to RSSChannel.m

-(void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)str;
{
[currentString appendString:str];
NSLog(@"%@=curString",currentString);

}

Check out the new logs, seems like currentString is always null, any ideas?


#5

Would it be possible to send me a zipped up copy of your project? My email is my user name at bignerdranch dot com. I’ll think what else it could be in the mean time. It’s odd that currentString is nil. I’m guessing the currentString = [[NSMutableString alloc] init]; line is getting called?


#6

I agree, cannot figure out why

Yeah, I checked that.

Sure, I will zip it up and send it.

Just note, I put a bunch of NSLog’s in for debugging purposes.

I appreciate your help!, will send shortly!


#7

Ok, found the issue. So if you run the code as is, and wait for everything to finish, you’ll notice you can actually scroll down within the app. I didn’t notice this at first, but realized it after identifying the problem. The problem that is occurring is directly related to the fact that the log prints out (null) for the strings. Since those strings are nil, although it is updating the rows, there is no text to display in the row. Here is the problem:

RSSChannel.h should be updated to be

@property (nonatomic,strong) NSString *title; // Changing from weak to strong @property (nonatomic,strong) NSString *infoString; // Changing from weak to strong
and RSSItem.h should be updated to be

@property (nonatomic,strong) NSString *title; // Changing from weak to strong @property (nonatomic,strong) NSString *link; // Changing from weak to strong
The parentParserDelegate is weak to prevent a retain cycle, as we always do with delegates, but the RSSChannel and the RSSItem need to OWN their strings. Since no one is owning those 4 strings, as soon as their declaration is finished, their memory is destroyed and the pointer is set back to nil (the wonderful behavior of weak references, that is unfortunately biting us in the butt in this case.)

Change those 4 lines, and you’ll be good to move on!


#8

Got it!

Thank you for your help, this makes sense!


#9

seems i am havign the same issue but there problem isnt the same i have all mine set to strong already and still my table is empty


#10

Please refrain from posting large logs (as in the first post). Computing resources are always finite!


#11

all my current strings are coming back as nil as well. i checked to see if i was connected to the url and it seems to be checking out i dotn know what else to try i am currently looking at sample code to find it