This is NameInspector.m in view mode; [Download] [Up]
#import "NameInspector.h" @implementation NameInspector - awakeFromNib; { [self clear:self]; return self; } - clear:sender; { [textField setStringValue:""]; return self; } - textActed:sender; { // note mit Name aus repository // wenn nicht gefunden, Failure Sound spielen; // sonst an client melden. Note *myNote; if(myNote = [myNR noteByNam:(char *)[textField stringValue]]){ [client newNote:myNote from:self]; }else{ NXBeep(); } [textField selectText:self]; return self; } - (void)displayNote:(Note *)note; { if(!note)return; if([note b]){ [textField setStringValue:[note name2]]; }else{ [textField setStringValue:[note name1]]; } } - (void)setEditable:(BOOL)yn; { [super setEditable:yn]; [(TextField *)textField setEnabled:yn]; [(TextField *)textField setBackgroundGray:(yn? 1.0 : 2./3.)]; } @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.