NSConcreteNotifyingMutableAttributedString
NSConcreteNotifyingMutableAttributedString
- Subject: NSConcreteNotifyingMutableAttributedString
- From: Pierre Chatel <email@hidden>
- Date: Wed, 30 Mar 2005 13:39:46 -0300
Hi there !
i have this NSTextField in my application, i enabled it for RTF and image support. So now i can drag images in the middle of the text i'm writing. I also added a standard font panel to my application.
Here comes the problem: if i select a piece of text with pictures and try to change font attributes with the font panel, i get this error and the NSTextView begins to behave strangely:
NSConcreteNotifyingMutableAttributedString addAttribute:value:range:: nil value
So i suppose that's it's somehow related to trying to apply font attributes to a pictures, and that "value" or "range" must be nil, causing the error. I looked at the code of TextEdit and i didn't find anything related to this issue: when you are in RTF mode in TextEdit you can apply font settings to text and images at the same time without problems.
Here is an extract of the code i'm using to create an empty NSTextView:
textView = [[[NSTextView alloc] initWithFrame:rectSave] autorelease];
[textView setAutoresizingMask:oldMask];
[textView setRichText:];
[textView setImportsGraphics:];
NSDictionary *textAttributes = [ defaultTextAttributes];
[textView setTypingAttributes:textAttributes];
[[[textView textStorage] mutableString] setString:];
Please help, as i'm really confused with this issue.
Thanks !
_______________________________________________
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