Don't raise exception when there is no setter for key.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25744 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2007-12-15 11:36:05 +00:00
parent db0050466d
commit fbc7e98146
2 changed files with 16 additions and 4 deletions

View file

@ -1,3 +1,10 @@
2007-12-15 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSKeyValueObserving.m (-overrideSetterFor:): Replace
exception with log message.
* Source/NSKeyValueObserving.m (-addObserver:...context:): Use
original class as key for replacement.
2007-12-15 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSKeyValueObserving.m (-overrideSetterFor:): Manually

View file

@ -339,10 +339,9 @@ static NSString *newKey(SEL _cmd)
static GSKVOReplacement *
replacementForInstance(id o)
replacementForInstance(Class c)
{
Class c = GSObjCClass(o);
GSKVOReplacement *r;
GSKVOReplacement *r;
setup();
@ -530,6 +529,8 @@ replacementForInstance(id o)
if ([dependentKey isEqual: aKey])
{
[self overrideSetterFor: mainKey];
// Mark the key as used
[keys addObject: aKey];
found = YES;
}
}
@ -540,8 +541,11 @@ replacementForInstance(id o)
if (!found)
{
NSLog(@"class %@ not KVC complient for %@", original, aKey);
/*
[NSException raise: NSInvalidArgumentException
format: @"class not KVC complient for %@", aKey];
*/
}
}
}
@ -1100,7 +1104,8 @@ replacementForInstance(id o)
setup();
[kvoLock lock];
r = replacementForInstance(self);
// Use the original class
r = replacementForClass([self class]);
/*
* Get the existing observation information, creating it (and changing