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

Re: NSTextView insrting text


  • Subject: Re: NSTextView insrting text
  • From: Douglas Davidson <email@hidden>
  • Date: Thu, 30 Mar 2006 13:57:37 -0800


On Mar 30, 2006, at 1:51 PM, Paul L. Gribble wrote:

When adding text to an NSTextView using insertText: it seems only to work if the NSTextView is Editable. So I have a workaround where I set it to be editable, then insertText, then set it not to be editable (I want it to be sort of a readout for the user who should not be able to type in it).

I must be doing it wrong ...???


You're doing it wrong. insertText: is the funnel point for text inserted by user typing. It isn't intended for anything other than user typing. I had the documentation folks insert a special note to that effect. If you want to manipulate text programmatically, deal with the text storage (NSTextStorage is a direct subclass of NSMutableAttributedString). See the text system documentation for more information.


Douglas Davidson

_______________________________________________
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


References: 
 >NSTextView insrting text (From: "Paul L. Gribble" <email@hidden>)

  • Prev by Date: NSTextView insrting text
  • Next by Date: Re: Cocoa Newbies: Is this the best list?
  • Previous by thread: NSTextView insrting text
  • Next by thread: Re: NSTextView insrting text
  • Index(es):
    • Date
    • Thread