Re: Setting typing attributes in NSTextView [SOLVED]
Re: Setting typing attributes in NSTextView [SOLVED]
- Subject: Re: Setting typing attributes in NSTextView [SOLVED]
- From: Jose Antonio Ortega <email@hidden>
- Date: Thu, 7 Apr 2005 02:31:18 +0200
On Apr 6, 2005, at 02:55, Jose Antonio Ortega wrote:
[...]
But now, I want, when the user keeps on typing, the font to be the
same as before the bold replacement. I.e., I want to avoid NSTextView
noticing that FOO is bold and inserting the next character in bold too
[1]. I've tried to set the typing attributes just after I modify FOO,
but
[...]
I found my mistake. Changing typing attributes has no effect because I
am modifying the text store directly, no the view. As a matter of fact
the problem was that I was calling
NSMutableAttributedString -replaceCharactersInRange:withString: to
insert new characters. As documented, it is this method who's
inheriting the attributes of inserted text.
Sorry for the fuss.
Cheers,
José Antonio.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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