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 trialRoulse Mutsigwa
Courses Plus Student 774 PointsChallenge Task 3 in Inheritance
The question reads: Finally, we have a class named 'Bling' which needs to have a property called 'ruby'. Switch over to 'Bling.h' and add a property named 'ruby' that belongs to the class 'Ruby'.
my answer is:
@interface Bling : NSObject
@property ( nonatomic, strong) Ruby * ruby;
@end
Its giving an error
Im sure this is the correct answer, could this be a bug on Treehouse's side?
4 Answers
wahidpayne2
12,343 PointsHey Roulse,
I completed the Inheritance exercises myself and had the same answer you have and everything passed smoothly. Then I went ahead and literally copied and pasted the answer you provided into the interface and it passed as well. So it has to be a bug or a glitch somewhere, have you tried opening a new tab or reopening the browser and starting it over?
Ken Alger
Treehouse TeacherRoulse;
Welcome to Treehouse!
Remember, the syntax for a property definition is:
@property(attributes) Classname *variable;
It looks like you have a slight syntax error in your code, which should read like:
@property(nonatomic, strong) Ruby *ruby;
Happy coding,
Ken
Roulse Mutsigwa
Courses Plus Student 774 PointsHi Ken
Thanks for responding, appreciate your help. I have written my code as above but it still gives a syntax error.
Roulse Mutsigwa
Courses Plus Student 774 PointsHi
Thanks Wahid and Ken. It all turned out good in the end.
Ken Alger
Treehouse TeacherKen Alger
Treehouse TeacherEdited for markup.