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 Objective-C Basics (Retired) Foundation Framework NSDictionary

Peter Elisen
Peter Elisen
7,432 Points

what is wrong with the the way i fill nsdictionary album ?

When i do the challenge task 1 to fill the NSDictionary album it is saying it is wrong because there is no content in it. However i do not see why this is the case. i even check the content with NSLOG. I use the following statement ;

NSDictionary *album = @{@"title": @"Abbey Road", @"artist":@"Beatles"};

I also tried the following statement with the same result :

NSDictionary *album = [[NSDictionary alloc] initWithObjectsAndKeys:@"Abbey Road", @"title", @"Beatles", @"artist", nil];

2 Answers

Get ready to bang your head against your desk... You forgot "The" in The Beatles.

Peter Elisen
Peter Elisen
7,432 Points

Hi Ricardo, Many thanks for that. i certainly banged my head over this one. I guess the "error" message is a little bit cryptical generated by the software. Glad there are still humans instead of software to help somebody out. I thought it was an error in the checking software. Many thanks and Kind regards, Peter