• 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: Sun, 28 Dec 2003 16:58:02 -0800

On 28 Dec, 2003, at 3:48 PM, Louis C. Sacha wrote:

4) It is possible that NSApplication uses the respondsToSelector: method on each of the objects in the responder chain to determine if they respond to the action message, not the two methods you mentioned setting breakpoints on.

I figured it out. There were two problems. The first is that I was attempting to send the noteFirstResponder: action before makeFirstResponder: returned. I delayed the windowDidMakeFirstResponder: call, and that fixed that.

The second problem is as you describe. NSApplication does not use the tryToPerformAction:with: method to send actions to the responder chain. Instead, it uses respondsToSelector: and performSelector:withObject:. I think this is a bug, and I intend to log it.

I overrode NSView's implementation of these two methods to check to see if the delegate responds to the selector. Now I'm wondering what the point of tryToPerformAction:with: is, since it doesn't appear to be used to send actions!
_______________________________________________
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>)
 >Re: Making a delegate NSResponder (From: Dustin Voss <email@hidden>)
 >Re: Making a delegate NSResponder (From: "Louis C. Sacha" <email@hidden>)

  • Prev by Date: Re: Reading return values from NSTask
  • Next by Date: Re: cocoa-dev digest, Vol 2 #3404 - 14 msgs
  • Previous by thread: Re: Making a delegate NSResponder
  • Next by thread: Re: [OT] True multiuser?
  • Index(es):
    • Date
    • Thread