character palette trashes attributes
character palette trashes attributes
- Subject: character palette trashes attributes
- From: Robert Clair <email@hidden>
- Date: Wed, 24 Nov 2004 10:30:55 -0500
Inserting characters using the character palette trashes all the typing
attributes
except the font. The font will be whatever is selected in the character
palette, but
there will be no other attributes, not even
NSForegroundColorAttributeName.
(The text will draw in black, but if you look at the attribute
dictionary
in the debugger it has only a single entry for the font.)
You can see this behavior with TextEdit. I've tried everything I can
think of to
fix it, with no luck. Entering the text this way goes through
NSTextView -insertText: which
calls NSTextView -setTypingAttributes twice. At the point of
-insertText: the
attributes are still good; by the time of the call to
-setTypingAttributes they are trashed.
I tried saving my own copy of the attributes in -insertText: and
setting some flags
so that if -setTypingAttributes: is called from within -insertText it
will try and
reset the original ones, but it doesn't work.
It's not a symbol font issue - it will happen even if you use the
character palette
to insert a Times-Roman "a".
Any help very much appreciated.
......Bob Clair
_______________________________________________
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