Removing NSLinkAttributeName doesn't remove the other attributes
Removing NSLinkAttributeName doesn't remove the other attributes
- Subject: Removing NSLinkAttributeName doesn't remove the other attributes
- From: Glen Simmons <email@hidden>
- Date: Wed, 1 Mar 2006 14:27:53 -0600
I'm handling the addition / editing / removal of links in an
NSTextView myself. Adding / editing links works fine, but removing
them, not so much. The removal of the link attribute works, but the
text is not updated to remove the other attributes (blue color,
underline). What am I missing? Here's what I'm doing:
NSTextStorage* theTS = [self textStorage];
NSArray* selRangesArray = [self selectedRanges];
unsigned i, count = [selRangesArray count];
NSRange theRange;
[theTS beginEditing];
for (i = 0; i < count; i++)
{
theRange = [[selRangesArray objectAtIndex:i] rangeValue];
[theTS removeAttribute:NSLinkAttributeName range:theRange];
}
[theTS endEditing];
_______________________________________________
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