Re: "check spelling as you type" persistence
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.