This is TextAppend.m in view mode; [Download] [Up]
#import "TextAppend.h" @implementation Text(Append) /* appendString: - append value of a string to the end of Text. */ - (void)appendString:(NSString *)aString { [self setSel:[self textLength] :[self textLength]]; [self replaceSel:[aString cString]]; [self scrollSelToVisible]; } /* appendString: - append value of a string to the end of Text with a specific font style. */ - (void)appendString:(NSString *)aString withFontStyle:(NXFontTraitMask)traits { int originalLength = [self textLength]; //** append text [self appendString:aString]; //** set font style [self setSel:originalLength :[self textLength]]; [self setSelFontStyle:traits]; } @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.