Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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