retrotron
thinking is design
I can't seem to reference an NSTextField. I've got to be missing something obvious.
So in Interface Builder I create a single textfield in the window, create a controller class with one outlet named '_outlet' of type NSTextField. I instantiate the class, control-drag from the controller instance to the textfield and connect the '_outlet' outlet. I generate the controller class file, then add an -awakeFromNib method and try to do this: [_outlet setString
"testing"]. But the application crashes and the error is that the selecter to [-NSTextField setString] is not recognized. What am I doing wrong?
Here's the .h and .m file:
So in Interface Builder I create a single textfield in the window, create a controller class with one outlet named '_outlet' of type NSTextField. I instantiate the class, control-drag from the controller instance to the textfield and connect the '_outlet' outlet. I generate the controller class file, then add an -awakeFromNib method and try to do this: [_outlet setString

Here's the .h and .m file:
Code:
// header file
#import <Cocoa/Cocoa.h>
@interface TextfieldOutputController : NSObject
{
IBOutlet NSTextField *_outlet;
}
- (void)awakeFromNib;
@end
// implementation file
#import "TextfieldOutputController.h"
@implementation TextfieldOutputController
- (void)awakeFromNib {
[_outlet string];
} // end awakeFromNib
@end