Re: insertText
Re: insertText
- Subject: Re: insertText
- From: Andreas Mayer <email@hidden>
- Date: Wed, 4 Jan 2006 12:05:22 +0100
Am 04.01.2006 um 10:15 Uhr schrieb Kenny Millar:
Do I use [textView string], to get the existing contents,
manipulate them
manually and then [textView setString] to send them back, or is
there a more
elegant method?
Yes, there is.
[textView textStorage] returns an NSTextStorage which is a subclass
of NSMutableAttributedString.
So you can do:
[[textView textStorage] replaceCharactersInRange:range
withString:string];
Andreas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden