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 trialCaleb Kleveter
Treehouse Moderator 37,862 PointsI can,t figure out whats wrong with my code.
Whats wrong with my code? I'm geting a bummer sign that says: Don't forget to add '@end' and make sure' Ruby' sub-classes 'Gem'.
@class Gem;
@interface Ruby : NSObject @property (nonatomic, strong) Gem *shape; @end
4 Answers
Kristen Law
16,244 PointsRemember that you can specify a superclass with the :
symbol. Right now, you have NSObject
as the superclass of Ruby
. The task is asking you to make Ruby
the subclass of Gem
, which is the same thing as saying that Gem
is the superclass of Ruby
.
See below:
@interface Ruby : Gem
@end
Caleb Kleveter
Treehouse Moderator 37,862 PointsI am having issues on task 2 in Ruby.h, and yes it is the right file.
notf0und
11,940 PointsFollow Kristen's answer for this :) In your original post, it seems you are also a bit ahead of yourself with the @property
declaration. Task 2 will only require what Kristen has detailed.
Caleb Kleveter
Treehouse Moderator 37,862 PointsI did what you said and I got this message: Bummer! Don't forget to add '@end' and make sure 'Ruby' subclasses 'Gem'. But whats wired is that I did put in the @end.
Caleb Kleveter
Treehouse Moderator 37,862 PointsNever minde, got it, thanks!
notf0und
11,940 Pointsnotf0und
11,940 PointsWhich Task are you getting this error on? Are you sure you've placed the correct code into the correct files?