• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Monitoring NSTextView Attributes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Monitoring NSTextView Attributes
      • From: Douglas Davidson <email@hidden>
    • Re: Monitoring NSTextView Attributes
      • From: Satoshi Matsumoto <email@hidden>
  • Prev by Date: Re: Function definitions
  • Next by Date: Re: Custom Views
  • Previous by thread: Solved: slow drawRect not displaying correctly
  • Next by thread: Re: Monitoring NSTextView Attributes
  • Index(es):
    • Date
    • Thread