• 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: Setting typing attributes in NSTextView [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Setting typing attributes in NSTextView (From: Jose Antonio Ortega <email@hidden>)

  • Prev by Date: Hiding/Showing Column Of TableView
  • Next by Date: C++ string and UTF8
  • Previous by thread: Re: Setting typing attributes in NSTextView
  • Next by thread: NSMatrix: subclassing to allow multiple selections in Radio Mode
  • Index(es):
    • Date
    • Thread