I've tried many of the answers that I've found here. I must be doing something dumb and could use help.
in .h: @property (strong) IBOutlet NSTextField *title;
in .m:
title = [[NSTextField alloc] init];
[title setStringValue:@"test"];
NSLog(@"title is %@", [title stringValue]);
In IB, the title field is set up like this:
and it's class is NSTextField.
I can get the data to show in the tableview, but I cannot link it to the textfield. Thanks for any help...
I do log the title field and that shows content:
title is test
After looking some more on SO, I came up with this, that works as I need it:
NSInteger row = [[notification object] selectedRow];
currentItem = [itemArray objectAtIndex:row];
[self.itemTitle setStringValue:
[NSString stringWithFormat: @"%@", [currentItem valueForKey:@"title"]]];
Thanks