• 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: "check spelling as you type" persistence
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "check spelling as you type" persistence


  • Subject: Re: "check spelling as you type" persistence
  • From: Chris Silverberg <email@hidden>
  • Date: Thu, 29 Jan 2004 11:25:30 -0800
  • Organization: Silverberg.Net

on 1/28/04 8:43 PM, Public Look at email@hidden wrote:

> Read about the field editor in the available documentation. While a
> text field is being edited, an actual NSTextView instance is
> substituted for the duration of the editing. You probably just want to
> "persist" the state of a particular window's field editor.

Thank you for your tip. This turned out to be the solution. I was a bit
mislead at first because NSWindow.h shows that fieldEditor returns an NSText
which wasn't what I was looking for. But the header file is not quite
accurate. As you pointed out, fieldEditor is really an NSTextView.

So the solution for me was to setup a notification for
'NSControlTextDidBeginEditingNotification'. When I receive that, I call
'setContinuousSpellCheckingEnabled' for the window's first responder, which
will be the NSTextView used by the current NSTextField. (I could probably
get the object from the notification instead of firstResponder, but my
notification function is also used in cases where I may not have the
object). Thus something like this:


-Chris
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: "check spelling as you type" persistence
      • From: Douglas Davidson <email@hidden>
References: 
 >Re: "check spelling as you type" persistence (From: Public Look <email@hidden>)

  • Prev by Date: NSTableHeaderView background
  • Next by Date: Changing font stuff in NSTextView + Undo
  • Previous by thread: Re: "check spelling as you type" persistence
  • Next by thread: Re: "check spelling as you type" persistence
  • Index(es):
    • Date
    • Thread