* EOControl/EOKeyValueQualifier.m

([EOKeyValueQualifier initWithKey:operatorSelector:value:]):
        Use EONull instance if value is nil.
        ([EOKeyValueQualifier evaluateWithObject:]): Use EONull
        instance if object is nil.
        * EOControl/EOQualifier.m (getKey): Always interpret
        'attName = nil' qualifiers as EOKeyValueQualifiers.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@18586 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Ayers 2004-02-12 10:28:09 +00:00
parent d76b18c85f
commit ed101c8d44
3 changed files with 24 additions and 0 deletions

View file

@ -1,5 +1,13 @@
2003-02-12 David Ayers <d.ayers@inode.at>
* EOControl/EOKeyValueQualifier.m
([EOKeyValueQualifier initWithKey:operatorSelector:value:]):
Use EONull instance if value is nil.
([EOKeyValueQualifier evaluateWithObject:]): Use EONull
instance if object is nil.
* EOControl/EOQualifier.m (getKey): Always interpret
'attName = nil' qualifiers as EOKeyValueQualifiers.
* EOControl/EODebug.h/m(EOFLogAssertGood_): Remove dependancy
on superfluous category.
([NSObject isa]): Remove category.

View file

@ -58,6 +58,7 @@ RCS_ID("$Id$")
#include <EOControl/EOObjectStore.h>
#include <EOControl/EOObjectStoreCoordinator.h>
#include <EOControl/EOEditingContext.h>
#include <EOControl/EONull.h>
#include <EOControl/EODebug.h>
/*
@ -79,6 +80,11 @@ RCS_ID("$Id$")
@end
@implementation EOKeyValueQualifier
static EONull *null = nil;
+ (void)initialize
{
null = [EONull null];
}
/**
* Returns an autoreleased EOKeyValueQualifier using key, selector and value.
@ -112,6 +118,10 @@ RCS_ID("$Id$")
_selector = selector;
ASSIGNCOPY(_key, key);
if (value == nil)
{
value = null;
}
ASSIGN(_value, value);
}
@ -194,6 +204,11 @@ RCS_ID("$Id$")
val = [object valueForKey: _key];
if (val == nil)
{
val = null;
}
imp = (BOOL (*)(id, SEL, id))[val methodForSelector: _selector];
if (imp != NULL)
{

View file

@ -214,6 +214,7 @@ static id getKey(const char **cFormat, const char **s, BOOL *isKeyValue,
if (value == 0 || value == ' ')
{
*cFormat = *s = *s+3;
*isKeyValue = YES;
return nil;
}
}