• 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
NSWindow's firstResponder and a pointer to that object.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSWindow's firstResponder and a pointer to that object.


  • Subject: NSWindow's firstResponder and a pointer to that object.
  • From: Johan Kool <email@hidden>
  • Date: Thu, 8 Jan 2004 18:10:11 +0100

Hello,

I can't find this anywhere. I am implementing an inspector and are listening for NSWindowDidBecomeMainNotification notifications. This gets me the current window, so now I would be interested in which object is the firstResponder. With [myWindow firstResponder] I get back a NSResponder, but with that pointer I can't send function calls to the firstResponder. I tried to send notifications from my view when it loses the firstResponder state, but as every window has a firstResponder, this only works when I have multiple views or when I create a new window.

So my question is: How do I get a pointer to myView in myWindow knowing that myView is the firstResponder and having a pointer to myWindow?

Related to this: How do I test that a pointer is to an object of a certain class?

Thanks!

Johan Kool
_______________________________________________
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: NSWindow's firstResponder and a pointer to that object.
      • From: Dustin Voss <email@hidden>
  • Prev by Date: Re: Collection classes
  • Next by Date: Re: Collection classes
  • Previous by thread: Solved Re: No windows - [NSPlaceholderString initWithString] nil string (or other) argument
  • Next by thread: Re: NSWindow's firstResponder and a pointer to that object.
  • Index(es):
    • Date
    • Thread