Assignment to a property of type NSTextField
I have a little program with one button and a text-field. When clicking the button, it should write a text into the text field. My AppDelegate.h is:
#import <Cocoa/Cocoa.h>
@interface ao_AppDelegate : NSObject <NSApplicationDelegate>
@property (assign) IBOutlet NSWindow *window;
- (IBAction)DoIt:(id)sender;
@property (weak) IBOutlet NSTextField *MiinText;
@end
and now I would like to fill in in the event routine DoIt of the button a text to property MiinText. I have tried several version (I am brand new in objective-C) and all produce error(s) - see below the Eventroutine in AppDelegate.m
- (IBAction)DoIt:(id)sender {
MiinText = [NSTextField @"jaja"];
}
What is the correct way of performing this assignment. I could not find the answer in the help system. Thanks.