Monitoring NSTextView Attributes
Monitoring NSTextView Attributes
- Subject: Monitoring NSTextView Attributes
- From: Scott Thompson <email@hidden>
- Date: Tue, 11 Apr 2006 15:56:06 -0500
We have code that likes to monitor the current selection in an
NSTextView and update the attributes of a panel (text color,
background color, font size, things like that) as the user enters text.
Our code is currently observing
NSTextStorageDidProcessEditingNotification and
NSTextViewDidChangeSelectionNotification. In response to those we
use calls like rangeForUserCharacterAttributeChange and
attributesAtIndex:effectiveRange: to figure out what attributes the
inspector should display.
The difficulty with this approach is that it seems to trip up
Japanese text entry. The glyphs that the user types go in, but at
the point where the user is supposed to be able to combine glyphs,
choose alternate forms, and things like that, we don't give them that
opportunity.
I guess one of the routines we use to discover the current attributes
is "ending" the inline editing session.
Can anyone point me to documentation on the right way to monitor the
character attributes of the selection in an NSTextView?
Scott
_______________________________________________
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