• 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: Appending NSStrings to an NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Appending NSStrings to an NSTextView


  • Subject: Re: Appending NSStrings to an NSTextView
  • From: Thomas Lachand-Robert <email@hidden>
  • Date: Mon, 31 Dec 2001 12:55:16 +0100

Le lundi 31 dicembre 2001, ` 08:15 , David Rehring a icrit :

I need to append an NSString to an NSTextView and there doesn't seem to be a
non-hackish way of doing it.


Use [myTextView insertText:mytext].
This inserts the text at the current selection point, so you may need to pu it at the end if you wish to append text:
[myTextView setSelectedRange:NSMakeRange([[myTextView textStorage] length]
);

If your text view is not editable, you need to make it so temporarily by clling setEditable:YES before and setEditable:NO after.

Thomas Lachand-Robert
********************** email@hidden
<< Et le chemin est long du projet ` la chose. >> Molihre, Tartuffe.


References: 
 >Appending NSStrings to an NSTextView (From: David Rehring <email@hidden>)

  • Prev by Date: Re: Lists as newsgroups (or: give chuq more work!)
  • Next by Date: Re: want backslash in NSString
  • Previous by thread: Re: Appending NSStrings to an NSTextView
  • Next by thread: Re: Appending NSStrings to an NSTextView
  • Index(es):
    • Date
    • Thread