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
Kai Aldag
Courses Plus Student 13,560 Pointscode challenge: sign up users
i have no idea what im doing wrong, it say make sure you set both user name and password properties.
#import "SignupViewController.h"
#import <Parse/Parse.h>
@implementation SignupViewController
- (IBAction)signup:(id)sender {
NSString *username = self.usernameField.text;
NSString *password = self.passwordField.text;
}
@end
any help would be good.
2 Answers
Ben Jakuben
Treehouse Teacherusername and password are properties of 'SignupViewController', so declaring them as new NSString variables gives you the Compilation Error.
Kai Aldag
Courses Plus Student 13,560 Pointsthere i got now im on 3/4 thank you so much
Kai Aldag
Courses Plus Student 13,560 PointsKai Aldag
Courses Plus Student 13,560 Pointsso how do i make them not properties of SignupViewController
Ben Jakuben
Treehouse TeacherBen Jakuben
Treehouse TeacherWell, in a real app that would depend on whether or not they should be properties. (In this code challenge the assumption is that they need to be properties for some reason.)
So what you need to do instead is figure out how to reference them instead of declaring new NSString variables. Here's a hint:
usernameFieldandpasswordFieldare also properties.Adam Peterka
9,626 PointsAdam Peterka
9,626 PointsI do not understand how to reference these without using NSString which does not work. Can you please help?
Thanks,
Adam
Ben Jakuben
Treehouse TeacherBen Jakuben
Treehouse TeacherHi Adam,
usernameandpasswordare properties that are already defined in the header file for this class (meaning they are declared with something like @property (nonatomic, strong) NSString *username;).All you need to do is reference them as properties of the current class. For an example, check out how
usernameFieldandpasswordFieldare referenced as properties in the code sample in the original question.