NSTextStorage setAttributedString problems
NSTextStorage setAttributedString problems
- Subject: NSTextStorage setAttributedString problems
- From: Will Thimbleby <email@hidden>
- Date: Fri, 20 Sep 2002 11:39:43 +0100
Hi,
I'm using setAttributedString on a NSTextStorage from a NSTextView, so
that I can directly set the html displayed. However this only seems to
work when the html I replace is smaller than the one I replace it with.
My Code:
attr = [[[NSAttributedString alloc] initWithHTML:html
documentAttributes:NULL] autorelease];
[[textBox textStorage] beginEditing];
[[textBox textStorage] setAttributedString:attr];
[[textBox textStorage] endEditing];
Error message when data replaced with smaller data: Data size 4096->3101.
*** NSRunStorage, _NSBlockNumberForIndex(): index (4094) beyond array
bounds (3101)
Is there a solution to this?
Or is there a better way to set the html of a NSTextView?
I'm using MOSX 10.1
Cheers, Will
_______________________________________________
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.