Re: Inserting in a read-only NSTextView?
Re: Inserting in a read-only NSTextView?
- Subject: Re: Inserting in a read-only NSTextView?
- From: j o a r <email@hidden>
- Date: Tue, 20 Apr 2004 19:29:35 +0200
Read the docs. for insertText:
================================================================
Inserts aString into the receivers text at the insertion point if
there is one, otherwise replacing the selection. The inserted text is
assigned the current typing attributes.
<snip>
Because this method pertains to the actions of the user, the text view
must be editable for the insertion to work. Generally, programmatic
modification of the text is best done by operating on the
NSTextStorage.
================================================================
It basically tells you why it doesn't work and what to do instead.
j o a r
On 2004-04-20, at 19.09, Randall Meadows wrote:
>
I have an NSTextView where I write out progress message and errors, et
>
al. I don't want the user to be able to type into or move the
>
insertion point of this view, so I initially unchecked the Editable
>
attribute in IB. But, that prevented me from adding text to it
>
*programmatically*, so I *had* to turn the Editable bit on. Is there
>
something else I'm missing, or do I need to wrap my programs
>
-insertText: with -setEditable:YES|NO calls? That would still allow
>
the user to *scroll* this view, right?
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.