• 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: insertText
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: insertText
      • From: Philip Dow <email@hidden>
References: 
 >RE: insertText (From: "Kenny Millar" <email@hidden>)

  • Prev by Date: Re: Synchronized outlets and actions
  • Next by Date: Re: How to execute the .app from the Terminal window
  • Previous by thread: RE: insertText
  • Next by thread: Re: insertText
  • Index(es):
    • Date
    • Thread