Hello,
I am building a mac application in cocoa and would like to know what is the message flow (method calls) when the user presses command+q. The app uses the document based architecture.
Thanks.
Hello,
I am building a mac application in cocoa and would like to know what is the message flow (method calls) when the user presses command+q. The app uses the document based architecture.
Thanks.
It goes up the responder chain like every other key press. If the first responder cannot or does not want to handle it, it gets passed up to the next in line. Usually for that key combination, the NSApplication
instance recognizes it, handles it and consumes it.
Apple explained this completely in WWDC 2010 session 145: http://developer.apple.com/videos/wwdc/2010/
You don't need to have attended WWDC to have access to it; the session videos are free to everybody with an ADC account this year.