• 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: Determining when an NSTextView is being edited?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Determining when an NSTextView is being edited? (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Determining when an NSTextView is being edited?
  • Next by Date: Re: Determining when an NSTextView is being edited?
  • Previous by thread: Determining when an NSTextView is being edited?
  • Next by thread: Re: Determining when an NSTextView is being edited?
  • Index(es):
    • Date
    • Thread