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 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