From 8143a35330b42628f75613856554360efda56c3e Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Mon, 23 Nov 2009 23:06:00 +0000 Subject: [PATCH] ... and the same change in NSResponder. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29051 72102866-910b-0410-8b05-ffd578937521 --- Source/NSResponder.m | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/Source/NSResponder.m b/Source/NSResponder.m index 82be3d987..b59d971aa 100644 --- a/Source/NSResponder.m +++ b/Source/NSResponder.m @@ -111,17 +111,12 @@ /* Can we perform the action -then do it */ if ([self respondsToSelector: anAction]) { - NSInvocation *inv; - NSMethodSignature *sig; - - sig = [self methodSignatureForSelector: anAction]; - inv = [NSInvocation invocationWithMethodSignature: sig]; - [inv setSelector: anAction]; - if ([sig numberOfArguments] > 2) - { - [inv setArgument: &anObject atIndex: 2]; - } - [inv invokeWithTarget: self]; + IMP actionIMP = [self methodForSelector: anAction]; + if (0 != actionIMP) + { + actionIMP(self, anAction, anObject); + return YES; + } return YES; } else