diff --git a/ChangeLog b/ChangeLog index 2f466d6..d54f8bd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2003 Jun 15 - * NSInvocation+additions: added unknown selector creation + * NSInvocation+additions: added unknown selector creation; created a + workaround for gnustep DO bug 2003 May 11 Stefan Urbanek diff --git a/Source/NSInvocation+additions.m b/Source/NSInvocation+additions.m index 4d067e8..d53ab9c 100644 --- a/Source/NSInvocation+additions.m +++ b/Source/NSInvocation+additions.m @@ -200,12 +200,14 @@ void STGetValueOfTypeFromObject(void *value, const char *type, id anObject) NSMethodSignature *signature; NSInvocation *invocation; SEL sel; - + BOOL requiresRegistration = NO; + + // NSLog(@"GETTING SELECTOR %@", selectorName); sel = NSSelectorFromString(selectorName); if(!sel) { - NSLog(@"REG REQIRED"); + // NSLog(@"REGISTERING SELECTOR"); char *name = [selectorName cString]; sel = sel_register_name(name); @@ -215,12 +217,23 @@ void STGetValueOfTypeFromObject(void *value, const char *type, id anObject) [NSException raise:STInternalInconsistencyException format:@"Unable to register selector '%@'", selectorName]; - return NULL; + return nil; } + requiresRegistration = YES; } signature = [target methodSignatureForSelector:sel]; + /* FIXME: this is workaround for gnustep DO bug (hight priority) */ + + if(requiresRegistration) + { + // NSLog(@"REGISTERING SELECTOR TYPES"); + sel = sel_register_typed_name([selectorName cString], [signature methodReturnType]); + // NSLog(@"REGISTERED %@", NSStringFromSelector(sel)); + + } + if(!signature) { [NSException raise:STInternalInconsistencyException