Re: NSConcreteNotifyingMutableAttributedString
Re: NSConcreteNotifyingMutableAttributedString
- Subject: Re: NSConcreteNotifyingMutableAttributedString
- From: "M. Uli Kusterer" <email@hidden>
- Date: Thu, 31 Mar 2005 16:41:34 +0200
At 22:49 Uhr -0600 30.03.2005, Charilaos Skiadas wrote:
So I would suggest ask, wait one or two days, and bring it up again
if you hear nothing in the meantime.
Better wait a week. The very smart people on this list usually get a
lot of mail, and just didn't get to your message until the weekend or
so.
Another thing that I noticed in this case is that the subject line is
completely pointless. Try to be concise. In this case, I'd have used
"addAttribute:value:range:: nil value error ?"
Try to be concrete. There are a lot of things that can be done with a
class, and NSConcreteNotifyingMutableAttributedString is a private
class, so when I read the subject I thought: Yet another person
trying to hack AppKit, I'll leave that to the reverse-engineering
pros and didn't even read it.
At 1:31 Uhr -0300 31.03.2005, Pierre Chatel wrote:
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
Sadly, I'm not one of the smart people mentioned above, and so I
don't really know what your error is. I can only offer guesses and
some debugging tips:
1) Use the debugger. Pause it before the error and type "fb
[NSException raise]", hit return. This will cause it to break into
the debugger whenever an exception is thrown. You can then go up the
call chain to find out when the error actually happened. Maybe
there's one of your calls somewhere in there that may be at fault.
2) In case this isn't an exception, try "fb fprintf", which will
break on some other error messages that are only logged to the
console (like the "double free() or free() of memory not malloc()ed"
error message).
3) Why are you doing [[[textView textStorage] mutableString]
setString:@""]; ? That looks rather odd to me. Usually the field
should already be empty. On a hunch. I'd say maybe something is
getting out of whack there because you're bypassing the mutable
attributed string and going directly for the string inside. Try to
build an empty NSAttributedString and then assigning that to the text
storage. Maybe the styles are out of range for your zero-length
string?
4) What does [self defaultTextAttributes] return? Have you made sure
it isn't NIL?
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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