• 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: firstResponder comparison failing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: firstResponder comparison failing


  • Subject: Re: firstResponder comparison failing
  • From: Julio Cesar Silva dos Santos <email@hidden>
  • Date: Fri, 9 Jun 2006 16:48:13 -0300

Maybe using if ([x isEqualTo:y])

On 09/06/2006, at 16:33, Mark Dawson wrote:

I'm having a problem with the first responder stuff; I figure it's something that I haven't learned about Cocoa/Obj-C:

[[x window] makeFirrstResponder:x]; // this works--the field becomes selected
id y = [[x window] firstResponder];
if (x ==y ) // this fails-- "x" & "y" have different pointer values


I figure this is part of Obj-C that I'm missing. Looking at "y", I see that it is an "NSTextView" type ("x" is an "NSTextField" type). How do I tell if "x" is a first responder/selected?

Thanks!

Mark
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >firstResponder comparison failing (From: Mark Dawson <email@hidden>)

  • Prev by Date: firstResponder comparison failing
  • Next by Date: Re: firstResponder comparison failing
  • Previous by thread: firstResponder comparison failing
  • Next by thread: Re: firstResponder comparison failing
  • Index(es):
    • Date
    • Thread