Re: NSConcreteNotifyingMutableAttributedString
Re: NSConcreteNotifyingMutableAttributedString
- Subject: Re: NSConcreteNotifyingMutableAttributedString
- From: Guy English <email@hidden>
- Date: Thu, 31 Mar 2005 11:32:32 -0500
Pierre Chatel <email@hidden> wrote:
> 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.
Range can't be nil because it's a C struct. Since you're using the
font panel it's unlikely either name or value are nil either. Which
leaves you a bit scewed as far as understanding your problem. :)
> Here is an extract of the code i'm using to create an empty NSTextView:
> textView = [[[NSTextView alloc] initWithFrame:rectSave] autorelease];
Why is this autoreleased? I assume you add it to the view hierarchy -
hopefully you do it right after the code you posted before the
autorelease pool gets it's hands on it.
Getting NSConcreteNotifyingMutableAttributedString implies you're
using bindings somewhere. I think - it may be that NSTextViews always
return Notifying subclasses these days though. If you are using
bindings try disabling them all and see if that fixes the problem in
some way.
Instead of this ( and as Uli points out I don't think it's requried at all ):
> [[[textView textStorage] mutableString] setString:@""];
Try this ( an NSText method, which is the superclass of NSTextView ):
[textView setString: @""];
What you're doing though with the mutable string seems legit so you
may have hit a bug.
> Please help, as i'm really confused with this issue.
Good luck!
Guy
_______________________________________________
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