From 42b53d068ee1ff70a5429353ad60dfb201e80fc4 Mon Sep 17 00:00:00 2001 From: mccallum Date: Sun, 3 Mar 1996 00:38:06 +0000 Subject: [PATCH] ([MethodInvocation -invokeWithObject:]): Make it a -subclassResponsibililty. ([MethodInvocation -initWithArgframe:selector:]): Raise an exception if we are unable to get a non-null selector type string. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1038 72102866-910b-0410-8b05-ffd578937521 --- Source/Invocation.m | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Source/Invocation.m b/Source/Invocation.m index 8f889483d..48a76a1ef 100644 --- a/Source/Invocation.m +++ b/Source/Invocation.m @@ -27,6 +27,10 @@ #include #include #include +#include + +/* xxx We are currently retaining the return value. + We shouldn't always do this. Make is an option. */ /* Deal with strrchr: */ #if STDC_HEADERS || HAVE_STRING_H @@ -494,6 +498,12 @@ my_method_get_next_argument (arglist_t argframe, if (! (sel_type = sel_get_type (sel)) ) sel_type = sel_get_type ( sel_get_any_typed_uid (sel_get_name (sel))); + /* xxx Try harder to get this type by looking up the method in the target. + Hopefully the target can be found in the FRAME. */ + if (!sel_type) + [NSException raise: @"SelectorWithoutType" + format: @"Couldn't find encoding type for selector %s.", + sel_get_name (sel)]; [self initWithArgframe: frame type: sel_type]; if (!frame) *sel_pointer = sel; @@ -624,7 +634,7 @@ my_method_get_next_argument (arglist_t argframe, - (void) invokeWithObject: anObj { - [self invokeWithTarget: anObj]; + [self subclassResponsibility: _cmd]; } - (SEL) selector