mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-04-25 00:11:46 +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)isValueConstant;
|
||||||
-(BOOL)isValueSettable;
|
-(BOOL)isValueSettable;
|
||||||
|
|
||||||
@end
|
|
||||||
|
|
||||||
//====================================================================
|
|
||||||
@interface GSWKeyValueAssociation (GSWAssociationB)
|
|
||||||
|
|
||||||
-(NSString*)keyPath;
|
-(NSString*)keyPath;
|
||||||
-(NSString*)debugDescription;
|
-(NSString*)debugDescription;
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -84,23 +84,28 @@ RCS_ID("$Id$")
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
-(void)setValue:(id)aValue
|
-(void)setValue:(id)aValue
|
||||||
inComponent:(GSWComponent*)object
|
inComponent:(GSWComponent*)component
|
||||||
{
|
{
|
||||||
|
NSException *ex = nil;
|
||||||
|
|
||||||
if ([_keyPath length]==0)
|
if ([_keyPath length]==0)
|
||||||
{
|
{
|
||||||
[NSException raise:NSInvalidArgumentException
|
[NSException raise:NSInvalidArgumentException
|
||||||
format:@"No key path when setting value %@ in object of class %@ for association %@",
|
format:@"No key path when setting value %@ in object of class %@ for association %@",
|
||||||
aValue,NSStringFromClass([object class]),self];
|
aValue,NSStringFromClass([component class]),self];
|
||||||
}
|
}
|
||||||
/*Not Here because self is not a string key !
|
|
||||||
//TODO (return something!)
|
NS_DURING {
|
||||||
[object validateValue:&aValue
|
[component validateTakeValue:aValue
|
||||||
forKey:self];
|
forKeyPath:_keyPath];
|
||||||
*/
|
} NS_HANDLER {
|
||||||
[GSWAssociation setValue:aValue
|
ex = localException;
|
||||||
inComponent:object
|
} NS_ENDHANDLER;
|
||||||
forKeyPath:_keyPath];
|
|
||||||
};
|
[component validationFailedWithException:ex
|
||||||
|
value:aValue
|
||||||
|
keyPath:_keyPath];
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
-(BOOL)isValueConstant
|
-(BOOL)isValueConstant
|
||||||
|
|
Loading…
Reference in a new issue