我对objective-c还很陌生,刚刚遇到了一个我以前从未见过的错误。我正在尝试将文本字段单元格设置为“可选”,但出现错误“没有用于分配给属性的 Setter 方法 'setIsSelectable'”。
这是 .h 和 .m 文件。谢谢。
DataPanel.h
#import <Cocoa/Cocoa.h>
@interface DataPanel : NSPanel
@property (weak) IBOutlet NSTextFieldCell *textField;
@end
DataPanel.m
#import "DataPanel.h"
@implementation DataPanel
@synthesize textField = _textField;
- (void) awakeFromNib{
_textField.stringValue = @"1.1 Performance standards The overall objective of the performance standards in Section 1.1 is to provide acoustic conditions in schools that (a) facilitate clear communication of speech between teacher and student, and between students, and (b) do not interfere with study activities.";
_textField.isSelectable = YES;
}
@end