Re: Determining when an NSTextView is being edited?
Re: Determining when an NSTextView is being edited?
- Subject: Re: Determining when an NSTextView is being edited?
- From: Randall Meadows <email@hidden>
- Date: Fri, 12 Oct 2007 19:51:37 -0600
At 7:43 PM -0600 10/12/07, Nick Zitzmann wrote:
I searched the archives and didn't find anything relevant to what
I'm trying to do...
I have an NSTextView subclass. I want to override -drawRect: so that
it does some additional drawing, but I want the drawing operation to
take place only if the text view is actually being edited. The
problem is, I can't find out how to get the editing state of an
NSTextView class.
How do I get the editing state of the class? I already tried
-selectedRange, but that appears to return a range even if the text
view isn't being edited. I looked in the documentation, including
the superclasses, and couldn't find an -isEditing method or
something similar.
Just a WAG here, but what about checking the parent window's
-firstResponder against self?
--
randy
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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