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

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


  • Subject: [SOLVED] Re: Calling -stringValue on a spell checked text field clears the misspellings?
  • From: Nick Zitzmann <email@hidden>
  • Date: Mon, 12 Mar 2007 16:51:44 -0600


On Mar 12, 2007, at 4:39 PM, Douglas Davidson wrote:

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.

Thanks Douglas. For the record, changing this:

NSString *changedText = [aTextField stringValue];

to this:

NSString *changedText = [[[[(NSTextView *)[aTextField currentEditor] textStorage] string] copy] autorelease];

fixed the problem and doesn't seem to break anything (famous last words).

Nick Zitzmann
<http://www.chronosnet.com/>


_______________________________________________

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


References: 
 >Calling -stringValue on a spell checked text field clears the misspellings? (From: Nick Zitzmann <email@hidden>)
 >Re: Calling -stringValue on a spell checked text field clears the misspellings? (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: PrefPane subclass error - fixed
  • Next by Date: Re: Sharing a content view between two NSViews
  • Previous by thread: Re: Calling -stringValue on a spell checked text field clears the misspellings?
  • Next by thread: Unable to display the NSTableView elements.
  • Index(es):
    • Date
    • Thread