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 trial

iOS

Code Challenge: Adding the Edit Friends Screen

So here is the problem. The first task asks to set the "query" variable. But the compiler will accept it even if the PFQuery is not declare. (PFQuery queryWithClassName:@"Apps"; will work but it needs to be: PFQuery *query = [PFQuery queryWithClassName:@"Apps"]; ) The fact that the compiler accepts it makes it impossible to do the second task wich involves calling the "query" variable.

1 Answer

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

It would be impossible to do that in a real app too, right? :smile:

Hi Ben, I am on the second question and have entered: [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { if (error) { NSLog(@"Error: %@ %@", error, [error userInfo]); } else {

    }
}];

I am extremely confused on why it won't work. My error message says "Bummer! Compilation Error! Make sure you have the correct syntax and are calling the method and passing the block like in the video."

NVM Ben I just figured out that I have to add PFQuery *query = part during step two. Thanks anyway!