• 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: Calling -stringValue on a spell checked text field clears the misspellings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling -stringValue on a spell checked text field clears the misspellings?


  • Subject: Re: Calling -stringValue on a spell checked text field clears the misspellings?
  • From: Douglas Davidson <email@hidden>
  • Date: Mon, 12 Mar 2007 15:39:20 -0700


On Mar 12, 2007, at 3:25 PM, Nick Zitzmann wrote:

I have an NSTextField. The text field's editor has continuous spell checking turned on. The text field's delegate calls -stringValue on the field every time the field has changed, because it needs the string value to accomplish another feature in the program.

But whenever it does this, the words that are visibly marked as misspelled are updated so that the misspelling mark is cleared. Once I remove the -stringValue message, this no longer happens, but I need that string value when a change has occurred. What can I do here?

If the control is currently editing, then you can call -currentEditor on it to obtain the field editor (an NSTextView) that is handling the editing. Probably the best thing for you to do is to obtain the string that you are interested in directly from the field editor. Bear in mind that this will be the raw value that is currently displayed; for example, if there is a complex input method in use, it may contain uncommitted partial inputs, or if there is a formatter attached, then the formatter may not have gotten a chance to work on it. The control's -stringValue is a processed value that is more suitable for use after editing has finished.


Douglas Davidson

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • [SOLVED] Re: Calling -stringValue on a spell checked text field clears the misspellings?
      • From: Nick Zitzmann <email@hidden>
References: 
 >Calling -stringValue on a spell checked text field clears the misspellings? (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Calling -stringValue on a spell checked text field clears the misspellings?
  • Next by Date: Re: PrefPane subclass error - fixed
  • Previous by thread: Calling -stringValue on a spell checked text field clears the misspellings?
  • Next by thread: [SOLVED] Re: Calling -stringValue on a spell checked text field clears the misspellings?
  • Index(es):
    • Date
    • Thread