Abunga
macrumors newbie
Hello again, my knowledge is rapidly improving but i have come stuck with this problem.
I have created a small app, just for practice, that will compare the answer given my a user in a text field with a set word. This is for a single on screen anagram. Should the user put in 'LITTLE', it will say WRONG! and should they put in 'DANGEROUS', it will of course say CORRECT! My issue is that I have tried different formations to no avail. It wont use the 'compare' operation with a text field.
What might you suggest. The offending code is below.
Thanks, Abunga.
I have created a small app, just for practice, that will compare the answer given my a user in a text field with a set word. This is for a single on screen anagram. Should the user put in 'LITTLE', it will say WRONG! and should they put in 'DANGEROUS', it will of course say CORRECT! My issue is that I have tried different formations to no avail. It wont use the 'compare' operation with a text field.
What might you suggest. The offending code is below.
Thanks, Abunga.
Code:
#import "Text_PracticeViewController.h"
@implementation Text_PracticeViewController
@synthesize userInput;
@synthesize userMark;
@synthesize userCorrect;
-(IBAction) setOutput:(id)sender {
if (userInput=@"DANGEROUS") {
userCorrect.text=@"CORRECT!";
} else {
userCorrect.text=@"WRONG!";
}
}