• 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: Which NSTextView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Which NSTextView?


  • Subject: Re: Which NSTextView?
  • From: Brian Webster <email@hidden>
  • Date: Sun, 18 Jan 2004 17:08:06 -0600

The active text view (i.e. the one with the blinking cursor) will be the window's first responder. So you can do something like:

if (myTextView1 == [myWindow firstResponder])
{
//do stuff
}

On Jan 18, 2004, at 11:08 AM, J Nozzi wrote:

List:

I've spent some time trying various searches in the archives, but I can't seem to pinpoint a definitive answer. Part of the problem is that if I knew what terms to look for, I probably wouldn't need to search for the answer anyway. ;-)

Basically, I've got three NSTextViews. I've got a custom method that needs to act upon text in the active NSTextView, whichever that may be at the time.

What's the quickest and safest way to determine this on the fly?

Thanks!

- J
_______________________________________________
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.


--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
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: Which NSTextView?
      • From: J Nozzi <email@hidden>
References: 
 >Which NSTextView? (From: J Nozzi <email@hidden>)

  • Prev by Date: Re: speed of alloc/init for NSNumber
  • Next by Date: Re: Which NSTextView?
  • Previous by thread: Which NSTextView?
  • Next by thread: Re: Which NSTextView?
  • Index(es):
    • Date
    • Thread