• 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: J Nozzi <email@hidden>
  • Date: Sun, 18 Jan 2004 18:10:43 -0500

ACK! Thank you! That's exactly what I was looking for. For some reason, I was thinking each view should have a "isFirstResponder" method or something similar. I wasn't thinking in terms of the parent's firstResponder. Thanks again!

- J


On Jan 18, 2004, at 6:08 PM, Brian Webster wrote:

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.

References: 
 >Which NSTextView? (From: J Nozzi <email@hidden>)
 >Re: Which NSTextView? (From: Brian Webster <email@hidden>)

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