• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Clearing an NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Clearing an NSTextView (From: Jeremy <email@hidden>)
 >Re: Clearing an NSTextView (From: "Gary L. Wade" <email@hidden>)

  • Prev by Date: Re: Clearing an NSTextView
  • Next by Date: Re: Clearing an NSTextView
  • Previous by thread: Re: Clearing an NSTextView
  • Next by thread: Re: Clearing an NSTextView
  • Index(es):
    • Date
    • Thread