Hi guys,
I'm having some trouble figuring out to call methods that I have in other classes
#import "myNewClass.h"
#import "MainViewController.h"
@implementation MainViewController
@synthesize txtUsername;
@synthesize txtPassword;
@synthesize lblUserMessage;
- (IBAction)calculateSecret {
NSString *usec = [self calculateSecretForUser:txtUsername.text
withPassword:txtPassword.text];
[lblUserMessage setText:usec];
[usec release];
}
...
myNewClass.h
#import <Foundation/Foundation.h>
@interface myNewClass : NSObject {
}
- (NSString*)CalculateSecretForUser:(NSString *)user withPassword:(NSString *)pwd;
@end
myNewClass.m
#import "myNewClass.h"
@implementation myNewClass
- (NSString*)CalculateSecretForUser:(NSString *)user withPassword:(NSString *)pwd
{
NSString *a = [[NSString alloc] initWithFormat:@"%@ -> %@", user, pwd];
return a;
}
@end
the method CalculateSecretForUser always says
'MainViewController' may not respond to '-calculateSecretForUser:withPassword:'
what am I doing wrong here?