Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialkirkbyo
15,791 PointsNeed Help with Displaying friends
I have re-watched the video several times and download the project to view his code, but I can't seem to find what I am doing wrong. Help is appreciated :)
https://www.dropbox.com/s/arg8v5pj6dxbp2t/Ribbit-%20Fire%20spread.zip
Thank you,
Ozzie
3 Answers
Ben Jakuben
Treehouse TeacherYour code looks good. Debug it and see if the objects
variable has anything in it when findObjectsInBackgroundWithBlock is called. If it does then you'll need to then debug cellForRowAtIndexPath to see why data isn't showing.
kirkbyo
15,791 PointsI got it! Thanks Ben for the help it is greatly appreciated
Ozzie
Matthew Harvey
3,128 PointsI had this same problem and it was a similar fix, but I didn't have a typo. The Parse key now has "FriendsRelation" capitalized, unlike when this video was made. So when you type that part in pink 2 posts above in Ben's post, make sure the @"friendsRelation" is actually @"FriendsRelation"
kirkbyo
15,791 Pointskirkbyo
15,791 PointsHi Ben,
I debugged findObjectsInBackgroundWithBlock and it ran good, but after I put another break point at cellForRowAtIndexPath and the application did not stop and just kept running. So that means cellForRowAtIndexPath is not being executed by the application. Right? If that is the issue, how can I fix it?
Thank you for helping me out with this problem :)
Ozzie
Ben Jakuben
Treehouse TeacherBen Jakuben
Treehouse TeacherI ran your app in debug mode and
self.friendsRelation
is nil, which means it isn't getting set properly. I took a look at your code and I found a typo where you are creating the friendsRelation field in the EditFriendsViewController class:PFRelation *friendsRelation = [self.currentUser relationForKey:@"firendsRelation"];
Change the name to match and you should be set!
As a side note, I should have put these "magic" string names into constants that could be defined once and reused throughout the app. I ended up doing that in the Android version. Doing it that way prevents any problems like this.