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 trialajor
8,216 PointsWhy do I keep getting an error message even though my code is correct?
I am working on task #3 of the NSDictionary challenge and keep getting the error message that my set date is not correct. However, I did set the release year to the value of 1969.
NSDictionary *album = @{ @"title": @"Abbey Road", @"artist": @"The Beatles"}; NSMutableDictionary *albumMutable = [NSMutableDictionary dictionaryWithDictionary:album]; [albumMutable setObject:@1969 forKey:@"year"];
What did I do wrong?
NSDictionary *album = @{ @"title": @"Abbey Road", @"artist": @"The Beatles"};
NSMutableDictionary *albumMutable = [NSMutableDictionary dictionaryWithDictionary:album];
[albumMutable setObject:@1969 forKey:@"year"];
2 Answers
Edwin Vergara
6,477 Pointsthe value 1969 needs to be a string. @"1969"
ajor
8,216 PointsEdwin, thank you so much for your help! It worked!