discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSWindowController should be a NSResponder (part 2)


From: Wolfgang Lux
Subject: NSWindowController should be a NSResponder (part 2)
Date: Thu, 23 Oct 2008 19:24:16 +0200

I wrote:

This patch fixes an issue that has bugged me already for quite a
while -- NSWindowController should be a subclass of NSResponder and
be part of the responder chain.

And here is a followup to yesterday's patch, after I finally found out
that action messages did not get delivered to the window controller
because NSApplication's -targetForAction: implementation breaks the
responder chain at the key and main window, respectively. The attached
patch fixes this.

Incidentally, breaking the responder chain is necessary just because
NSWindow makes the shared application instance the next responder of
a fresh window instance. I don't think that this should be necessary
(and it is not the case on OS X). From a cursory look at the NSResponder
implementation, most methods that follow the responder chain are not
overwritten by NSApplication, so it does not matter whether the application
object is at the end of the responder chain, and other methods like
presentError: explicitly invoke the respective NSApp method when no
receiver is found in the responder chain.

Wolfgang

Attachment: wincontr3.patch
Description: Binary data




reply via email to

[Prev in Thread] Current Thread [Next in Thread]