Skip navigation.
 
mlRe: Clearing an NSTextView
FROM : I. Savant
DATE : Sun Feb 24 21:28:16 2008

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.

Related mailsAuthorDate
mlClearing an NSTextView Jeremy Feb 24, 20:43
mlRe: Clearing an NSTextView Gary L. Wade Feb 24, 21:16
mlRe: Clearing an NSTextView I. Savant Feb 24, 21:20
mlRe: Clearing an NSTextView Jeremy Feb 24, 21:23
mlRe: Clearing an NSTextView I. Savant Feb 24, 21:28
mlRe: Clearing an NSTextView I. Savant Feb 24, 21:30
mlRe: Clearing an NSTextView I. Savant Feb 24, 21:33
mlRe: Clearing an NSTextView Jeremy Feb 24, 21:34
mlRe: Clearing an NSTextView I. Savant Feb 24, 21:38
mlRe: Clearing an NSTextView Jeremy Feb 24, 21:44