Re: NSTextView insrting text
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