• 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: Making a delegate NSResponder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making a delegate NSResponder


  • Subject: Re: Making a delegate NSResponder
  • From: Dustin Voss <email@hidden>
  • Date: Tue, 23 Dec 2003 09:43:46 -0800

On 23 Dec, 2003, at 8:59 AM, Fritz Anderson wrote:

I can't seem to find "windowDidMakeFirstResponder:" in any API or reference I have handy. By any chance is it private? There may be a reason it is private, namely that at the time it is called, the responder chain may not be not complete.

This ain't Windows. The unpublished APIs aren't hidden gold.

-- F

You know, you are correct. I can't find it documented anywhere, either. I have no idea where I learned about windowDidMakeFirstResponder:, but I could swear it is documented somewhere.

Assuming this is the problem (even though the method does get called), how can I track first responder changes?


On 22 Dec 2003, at 3:40 PM, Dustin Voss wrote:
I'm expecting the DelegatingView class to handle an action I wrote called "noteFirstResponder:" which I send to the first responder when it changes. I send it from the window controller's windowDidMakeFirstResponder: method like so:
[NSApp sendAction:@selector(noteFirstResponder:) to:nil from:nil]
...
In my tests, the first responder is a checkbox within a DelegatingView. I make the checkbox the first responder by tabbing to it. The checkbox gets a focus ring, and windowDidMakeFirstResponder: is called, so the checkbox should be the first responder and should get the "noteFirstResponder:" action.

However, I can't trace execution past the sendAction:to:from: call. I put breakpoints on the DelegatingView's tryToPerform:with: and doCommandBySelector: methods, but they never get hit. This would seem to mean that the DelegatingView is not actually part of the responder chain, or else noteFirstResponder: does not get passed along the responder chain, both of which seem very unlikely.
_______________________________________________
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: 
 >Making a delegate NSResponder (From: Dustin Voss <email@hidden>)
 >Re: Making a delegate NSResponder (From: Fritz Anderson <email@hidden>)

  • Prev by Date: WebKit problem
  • Next by Date: Re: WebKit problem
  • Previous by thread: Re: Making a delegate NSResponder
  • Next by thread: Re: Making a delegate NSResponder
  • Index(es):
    • Date
    • Thread