Re: Making a delegate NSResponder
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.