Um I'm really new at programming and I just had a question about why something isn't working. I trying to get a NSTextField object named label to display what ever text i give it, but it wont display anything. What the crap am I doing wrong?
Code:
#import <Cocoa/Cocoa.h>
@interface Count : NSObject {
IBOutlet NSTextField *textField;
IBOutlet NSTextField *label;
NSString *textFieldString;
}
-(IBAction)count: (id)sender;
-(void)getText;
-(void)setLabel;
@end
#import "Count.h"
@implementation Count
-(IBAction)count: (id)sender
{
Count *appController = [[Count alloc] init];
[appController getText];
[appController setLabel];
}
-(void)getText
{
textFieldString = [textField stringValue];
}
-(void)setLabel
{
[label setStringValue:@"hi"];
}
@end