Re: Appending NSStrings to an NSTextView
Re: Appending NSStrings to an NSTextView
- Subject: Re: Appending NSStrings to an NSTextView
- From: Thomas Lachand-Robert <email@hidden>
- Date: Mon, 31 Dec 2001 12:55:16 +0100
Le lundi 31 dicembre 2001, ` 08:15 , David Rehring a icrit :
I need to append an NSString to an NSTextView and there doesn't seem to
be a
non-hackish way of doing it.
Use [myTextView insertText:mytext].
This inserts the text at the current selection point, so you may need to
pu it at the end if you wish to append text:
[myTextView setSelectedRange:NSMakeRange([[myTextView textStorage] length]
);
If your text view is not editable, you need to make it so temporarily by
clling setEditable:YES before and setEditable:NO after.
Thomas Lachand-Robert
********************** email@hidden
<< Et le chemin est long du projet ` la chose. >> Molihre, Tartuffe.