• 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
Insert text at end of Textview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Insert text at end of Textview


  • Subject: Insert text at end of Textview
  • From: Alexander Griekspoor <email@hidden>
  • Date: Thu, 3 Oct 2002 14:50:31 +0200

Hello all,

I've tried to search the archives, but couldn't find an answer to the
following question:
How do I make sure that my text is inserted at the end of the contents
of my textview?
I now how to make my textview first responder, and how to insert the
text with
[myTextView insertText: @"blabla"];
I guess I have to set the selection first with:
[myTextView setSelectedRange: NSMakeRange(X,Y)]; where X marks the last
position in the text, and Y the length (guess it should be 0 in my
case). The problem is, how do I find out what the last character
position is in my textview. Could anyone help me out? It's very well
possible that there is a far easier way, which I would like to hear of
course ;-)

Many thanks in advance,
Alexander Griekspoor
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Insert text at end of Textview
      • From: Scott Anguish <email@hidden>
    • Re: Insert text at end of Textview
      • From: Dan Sugalski <email@hidden>
    • Re: Insert text at end of Textview
      • From: Arthur Clemens <email@hidden>
  • Prev by Date: Menu items that reflect the document status
  • Next by Date: Re: NSTableView and check boxes (for the hundredth time)
  • Previous by thread: Re: Menu items that reflect the document status
  • Next by thread: Re: Insert text at end of Textview
  • Index(es):
    • Date
    • Thread