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

Dan Friedman
Dan Friedman
8,955 Points

Getting Data From the Web, Code Challenge Task 3

I am unable to get the correct answer. Can someone please give me a hint on what's wrong with my code?

NSDictionary *book1 = [NSDictionary dictionaryWithObjectsAndKeys:@"Art of War", @"Title", @"Sun Tzu", @"Author", nil];
NSDictionary *book2 = [NSDictionary dictionaryWithObjectsAndKeys:@"Brave New World", @"Title", @"Aldous Huxley", @"Author", nil];
self.booksArray = [NSArray arrayWithObjects: book1, book2, nil];

Question is at: http://teamtreehouse.com/library/build-a-blog-reader-iphone-app-2/getting-data-from-the-web/what-is-nsdictionary

Stone Preston
Stone Preston
42,016 Points

can you post a link to the challenge please

3 Answers

Dan Friedman
Dan Friedman
8,955 Points

I figured it out! Thanks for the help Stone Preston.

Stone Preston
Stone Preston
42,016 Points

It states: Create an array called booksArray with the objects book1 and book2.

you didnt create an array called booksArray, you referenced a property named booksArray. You need to create a new variable, not reference a property