开发者

Responder chains for nil-targeted actions and events

Do 开发者_StackOverflow中文版events (i.e. -keyDown: and -keyUp:) follow the same responder chain as nil-targeted actions?

Thanks.


Similar, but not the same. See the Apple Conceptual Guide on Event Architecture at http://developer.apple.com/mac/library/documentation/cocoa/Conceptual/EventOverview/EventArchitecture/EventArchitecture.html, especially the section "The Responder Chains"

In this section are two subsections, "Responder Chain For Event Messages" and "Responder Chain for Action Messages" that detail the two chains and the differences between them. There are too many differences to detail, but some include: 1) The responder chain for action messages includes both the key window and the main window when both are present. The responder chain for key events includes only the key window. 2) For event messages, the last things in the chain are NSWindow and a NSWindowController if present. For action messages, the last thing is NSApp and its delegate.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜