Skip navigation.
 
mlcharacter palette trashes attributes
FROM : Robert Clair
DATE : Wed Nov 24 16:30:55 2004

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

Related mailsAuthorDate
No related mails found.