Re: Clearing an NSTextView
Re: Clearing an NSTextView
- Subject: Re: Clearing an NSTextView
- From: "I. Savant" <email@hidden>
- Date: Sun, 24 Feb 2008 15:28:16 -0500
On Feb 24, 2008, at 3:16 PM, Gary L. Wade wrote:
[textView setString:@"Lyrics Code Here"];
Of course this works too. :-) The caveat is that if you have
formatting applied, this may interfere. There are similar NSText
methods such as -replaceCharactersInRange:withString: and the like.
These also give no control over formatting.
If you're worried about preserving formatting (when you have
"allows multiple fonts" enabled, etc.) you'll find it easier to modify
the underlying NSTextStorage.
--
I.S.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden