I have the following code where I create a textLabel. Although I have [textView setEditable:YES]; in this chunck of code, I still can't edit the text inside the textbox while my app is running. What am I doing wrong here?
-(NSView *)elementView {
NSView* view = [super elementView];
NSTextField* textView = [[[NSTextField alloc] initWithFrame:view.bounds] autorelease];
textView.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
textView.stringValue = self.text != nil ? self.text : @"Label";
textView.textColor = self.textColor;
textView.font = [NSFont fontWithName:self.fontName size:self.fontSize];
NSTextAlignment alignment = NSLeftTextAlignment;
if([@"center" isEqualToString:self.textAlignment]) {
alignment = NSCenterTextAlignment;
} else if([@"right" isEqualToString:self.textAlignment]) {
alignment = NSRightTextAlignment;
}
textView.alignment = alignment;
[textView setEditable:YES];
[textView setSelectable:NO];
[textView setDrawsBackground:NO];
[textView setContinuous:NO];
[view addSubview:textView];
return view;
any help would be appreciated.