• 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
Re: Multi-keystroke text input issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multi-keystroke text input issue


  • Subject: Re: Multi-keystroke text input issue
  • From: Satoshi Matsumoto <email@hidden>
  • Date: Tue, 09 Nov 2004 22:02:29 +0900

Hi Gideon,

on 04.11.9 8:44 PM, Gideon King wrote:
> I have a case where I need to regenerate a text view after each
> keystroke (in textView:shouldChangeTextInRange:replacementString:) and
> reset the text using the text storage's setAttributedString: method.
> This works fine in English, but when users are entering text which
> requires multiple keystrokes for generation of a single character (e.g.
> in using Hirgana input), the call to the shouldChangeTextInRange...
> method is sent for every keystroke even if a full character has not
> been composed yet.
>
> How do I pick up that I don't have a full character yet so I can allow
> the textview to display the partially composed character?

You can check it using NSTextInput protocol

- (BOOL)hasMarkedText

Returns YES if the receiver has marked text, NO if it doesn’t. Unlike other
methods in this protocol, this one is not called by an input server. The
text view itself may call this method to determine whether there currently
is marked text. NSTextView, for example, disables the Edit>Copy menu item
when this method returns YES.

Hope that helps.

Satoshi Matsumoto


 _______________________________________________
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: Multi-keystroke text input issue
      • From: Gideon King <email@hidden>
References: 
 >Multi-keystroke text input issue (From: Gideon King <email@hidden>)

  • Prev by Date: Re: Filtering out all invisible files in a file system browser
  • Next by Date: Re: Getting the desktop background
  • Previous by thread: Multi-keystroke text input issue
  • Next by thread: Re: Multi-keystroke text input issue
  • Index(es):
    • Date
    • Thread