mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-02-22 19:21:23 +00:00
o raise exception if empty keyPath in +setValue:inObject:forKeyPath:
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@19041 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
94eccc5e54
commit
864cbfbab0
1 changed files with 95 additions and 96 deletions
|
@ -195,7 +195,6 @@ static NSMutableArray* associationsLogsHandlerClasses=nil;
|
||||||
-(void)setValue:(id)value
|
-(void)setValue:(id)value
|
||||||
inComponent:(GSWComponent*)component
|
inComponent:(GSWComponent*)component
|
||||||
{
|
{
|
||||||
//OK
|
|
||||||
[self setValue:value
|
[self setValue:value
|
||||||
inObject:component];
|
inObject:component];
|
||||||
};
|
};
|
||||||
|
@ -875,8 +874,13 @@ static NSMutableArray* associationsLogsHandlerClasses=nil;
|
||||||
NSStringFromClass([object class]),
|
NSStringFromClass([object class]),
|
||||||
NSStringFromClass([object superclass]));
|
NSStringFromClass([object superclass]));
|
||||||
NSDebugMLLog(@"associations",@"GSWAssociation: keyPath:%@",keyPath);
|
NSDebugMLLog(@"associations",@"GSWAssociation: keyPath:%@",keyPath);
|
||||||
if (keyPath)
|
if ([keyPath length]==0)
|
||||||
{
|
{
|
||||||
|
[NSException raise:NSInvalidArgumentException
|
||||||
|
format:@"No key path when setting value %@ in object of class %@",
|
||||||
|
value,NSStringFromClass(object)];
|
||||||
|
};
|
||||||
|
|
||||||
#if HAVE_GDL2
|
#if HAVE_GDL2
|
||||||
[object smartTakeValue:value
|
[object smartTakeValue:value
|
||||||
forKeyPath:keyPath];
|
forKeyPath:keyPath];
|
||||||
|
@ -982,11 +986,6 @@ static NSMutableArray* associationsLogsHandlerClasses=nil;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
NSDebugMLLog(@"associations",@"GSWAssociation: setValue:%@ : NoKeyPath",value);
|
|
||||||
};
|
|
||||||
LOGClassFnStop();
|
LOGClassFnStop();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue