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!
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 trial
miles fishman
Courses Plus Student 3,610 PointsDisplaying List Of Friends Challenge 4of4 what am I doing wrong here?
@implementation FavoriteMoviesViewController
- (void)viewDidLoad ,NSError *error
[super viewDidLoad];
// Add custom code below!
self.moviesRelation=[[PFUser currentUser] objectForKey:@"moviesRelation"];
PFQuery*query=[self.moviesRelation query];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
if (error){
}
else{
}
}];
@end
2 Answers

Dennis Walsh
5,793 PointsMiles,
Can you post a link to the video/challenge that you have the question on? The method signature does not look correct with the NSError *error parameter is this just a formatting issue in the post? viewDidLoad does not have any parameters.
Did you choose your own name for the PFRelation variable? I beleive that it was called friendsRelation in the video. The value will need to be consistent where ever it is used, in your code as well as in Parse.
- (void)viewDidLoad
{
//all your code here
}
PFRelation *friendsRelation;

Greg Barbosa
9,874 PointsI didn't put an if-else block in my Code Challenge and it worked for me.
@implementation FavoriteMoviesViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Add custom code below!
self.moviesRelation = [[PFUser currentUser] objectForKey:@"moviesRelation"];
PFQuery *query = [self.moviesRelation query];
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error){
}];
}