mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Make NSApplication's responder chain for action messages consistent
with Apple's documentation and the Mac OS X implementation. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27008 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
4e48499493
commit
edd9b4a68a
1 changed files with 9 additions and 7 deletions
|
@ -2041,7 +2041,7 @@ IF_NO_GC(NSAssert([event retainCount] > 0, NSInternalInconsistencyException));
|
|||
*/
|
||||
- (id) targetForAction: (SEL)aSelector forWindow: (NSWindow *)window
|
||||
{
|
||||
id resp;
|
||||
id resp, delegate;
|
||||
|
||||
resp = [window firstResponder];
|
||||
while (resp != nil && resp != self)
|
||||
|
@ -2050,15 +2050,17 @@ IF_NO_GC(NSAssert([event retainCount] > 0, NSInternalInconsistencyException));
|
|||
{
|
||||
return resp;
|
||||
}
|
||||
if (resp == window)
|
||||
{
|
||||
delegate = [window delegate];
|
||||
if ([delegate respondsToSelector: aSelector])
|
||||
{
|
||||
return delegate;
|
||||
}
|
||||
}
|
||||
resp = [resp nextResponder];
|
||||
}
|
||||
|
||||
resp = [window delegate];
|
||||
if (resp != nil && [resp respondsToSelector: aSelector])
|
||||
{
|
||||
return resp;
|
||||
}
|
||||
|
||||
if ([NSDocumentController isDocumentBasedApplication])
|
||||
{
|
||||
resp = [[NSDocumentController sharedDocumentController]
|
||||
|
|
Loading…
Reference in a new issue