mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-02-21 02:41:04 +00:00
* small cleanups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@25624 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e8b2f11ba2
commit
cf8eac40f2
2 changed files with 20 additions and 20 deletions
|
@ -46,11 +46,6 @@
|
|||
-(BOOL)isValueConstant;
|
||||
-(BOOL)isValueSettable;
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWKeyValueAssociation (GSWAssociationB)
|
||||
|
||||
-(NSString*)keyPath;
|
||||
-(NSString*)debugDescription;
|
||||
@end
|
||||
|
|
|
@ -84,23 +84,28 @@ RCS_ID("$Id$")
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)setValue:(id)aValue
|
||||
inComponent:(GSWComponent*)object
|
||||
inComponent:(GSWComponent*)component
|
||||
{
|
||||
NSException *ex = nil;
|
||||
|
||||
if ([_keyPath length]==0)
|
||||
{
|
||||
[NSException raise:NSInvalidArgumentException
|
||||
format:@"No key path when setting value %@ in object of class %@ for association %@",
|
||||
aValue,NSStringFromClass([object class]),self];
|
||||
}
|
||||
/*Not Here because self is not a string key !
|
||||
//TODO (return something!)
|
||||
[object validateValue:&aValue
|
||||
forKey:self];
|
||||
*/
|
||||
[GSWAssociation setValue:aValue
|
||||
inComponent:object
|
||||
forKeyPath:_keyPath];
|
||||
};
|
||||
{
|
||||
[NSException raise:NSInvalidArgumentException
|
||||
format:@"No key path when setting value %@ in object of class %@ for association %@",
|
||||
aValue,NSStringFromClass([component class]),self];
|
||||
}
|
||||
|
||||
NS_DURING {
|
||||
[component validateTakeValue:aValue
|
||||
forKeyPath:_keyPath];
|
||||
} NS_HANDLER {
|
||||
ex = localException;
|
||||
} NS_ENDHANDLER;
|
||||
|
||||
[component validationFailedWithException:ex
|
||||
value:aValue
|
||||
keyPath:_keyPath];
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(BOOL)isValueConstant
|
||||
|
|
Loading…
Reference in a new issue