diff --git a/ChangeLog b/ChangeLog index 4e1d21109..ac425aa28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-07-27 Richard Frith-Macdonald + + * Source/NSInvocation.m: implement methodSignatureForSelector for + proxy. + 2003-07-26 Richard Frith-Macdonald * Source/GSFFCALLInvocation.m: Add evil hack to cope with cases diff --git a/Source/NSInvocation.m b/Source/NSInvocation.m index 5c9d826dc..10de894df 100644 --- a/Source/NSInvocation.m +++ b/Source/NSInvocation.m @@ -50,6 +50,7 @@ static Class NSInvocation_concrete_class; + (id) _newWithTarget: (id)t; - (NSInvocation*) _invocation; - (void) forwardInvocation: (NSInvocation*)anInvocation; +- (NSMethodSignature*) methodSignatureForSelector: (SEL)aSelector; @end @interface GSMessageProxy : GSInvocationProxy @end @@ -1001,7 +1002,7 @@ _arg_addr(NSInvocation *inv, int index) { GSInvocationProxy *o; o = (GSInvocationProxy*) NSAllocateObject(self, 0, NSDefaultMallocZone()); - o->target = t; + o->target = RETAIN(t); return o; } - (NSInvocation*) _invocation @@ -1025,6 +1026,10 @@ _arg_addr(NSInvocation *inv, int index) { invocation = anInvocation; } +- (NSMethodSignature*) methodSignatureForSelector: (SEL)aSelector +{ + return [target methodSignatureForSelector: aSelector]; +} @end @implementation GSMessageProxy diff --git a/Source/NSUndoManager.m b/Source/NSUndoManager.m index 5341659ee..5af3f8d9c 100644 --- a/Source/NSUndoManager.m +++ b/Source/NSUndoManager.m @@ -420,7 +420,7 @@ NSString *NSUndoManagerWillUndoChangeNotification = else { [NSException raise: NSInternalInconsistencyException - format: @"forwardInvocation without beginUndoGrouping"]; + format: @"forwardInvocation without beginUndoGrouping"]; } } [anInvocation setTarget: _nextTarget]; diff --git a/Testing/nsinvocation.m b/Testing/nsinvocation.m index e798b5872..ba2a63481 100644 --- a/Testing/nsinvocation.m +++ b/Testing/nsinvocation.m @@ -152,6 +152,7 @@ typedef struct { } - (void) forwardInvocation: (NSInvocation*)inv; - (id) initWithTarget: (id)target; +- (NSMethodSignature*) methodSignatureForSelector: (SEL)aSelector; @end @implementation MyProxy @@ -178,6 +179,10 @@ typedef struct { [inv setReturnValue: b]; objc_free(b); } +- (NSMethodSignature*) methodSignatureForSelector: (SEL)aSelector +{ + return [obj methodSignatureForSelector: aSelector]; +} @end int