Replacing contents of NSTextView...
Replacing contents of NSTextView...
- Subject: Replacing contents of NSTextView...
- From: "Shoaib" <email@hidden>
- Date: Thu, 20 Jun 2002 20:38:33 GMT
I have a read-only NSTextView whose contents change constantly. I've
implemented the ability to show highlighted URLs in my NSTextView so http
links shows up as blue and underlined. I am using the underlying
NSTextStorage object to set the attributes of any URL strings in the
NSTextView.
Here's the problem:
If the contents of NSTextView are replaced (via NSTextView.setString), it
appears as if the attributes that were set for the previous contents don't
get overwritten. The NSTextStorage object appears to retain them. So if
originally my NSTextView had URLs string in it, and the new contents don't
have any, parts of the new content show up as blue and underlined.
Do I need to call NSTextStorage.deleteCharactersInRange() to clear out the
attributes that were used by the previous contents everytime the contents of
NSTextView are replaced?
_______________________________________________
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.