[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Selectors and categories in GNUstep (porting from Cocoa)
From: |
Andreas Hoeschler |
Subject: |
Re: Selectors and categories in GNUstep (porting from Cocoa) |
Date: |
Thu, 9 May 2002 00:25:20 +0200 |
Hi Ian,
thanks for the quick response.
well, to start off with, change this:
switch ([attributeNames count])
to this:
switch (([attributeNames count]))
That helped. It were rather statements like this
if (object = [self firstOne])
...
that caused warnings under GNUstep.
as far as the "isEqualTo:" method not being found, you might not have
<Foundation/NSString.h> imported, or you may just need to typecast the
object to (NSString *) in order to avoid the warning.
Why NSString? According to my research the warnings are generated by the
following code:
if (sel == FBQualifierOperatorNotEqual)
return [leftValue isNotEqualTo:rightValue];
else if (sel == FBQualifierOperatorLessThan)
return [leftValue isLessThan:rightValue];
else if (sel == FBQualifierOperatorGreaterThan)
return [leftValue isGreaterThan:rightValue];
else if (sel == FBQualifierOperatorLessThanOrEqualTo)
return [leftValue isLessThanOrEqualTo:rightValue];
else if (sel == FBQualifierOperatorGreaterThanOrEqualTo)
return [leftValue isGreaterThanOrEqualTo:rightValue];
else if (sel == FBQualifierOperatorContains)
return [leftValue doesContain:rightValue];
else if (sel == FBQualifierOperatorLike)
where sel is a selector (SEL) and FBQualifierOperatorNotEqual,... are
defined as follows:
#define FBQualifierOperatorEqual @selector(isEqualTo:)
#define FBQualifierOperatorNotEqual @selector(isNotEqualTo:)
#define FBQualifierOperatorLessThan @selector(isLessThan:)
#define FBQualifierOperatorGreaterThan @selector(isGreaterThan:)
#define FBQualifierOperatorLessThanOrEqualTo
@selector(isLessThanOrEqualTo:)
#define FBQualifierOperatorGreaterThanOrEqualTo
@selector(isGreaterThanOrEqualTo:)
#define FBQualifierOperatorContains @selector(doesContain:)
#define FBQualifierOperatorLike @selector(isLike:)
Why is this causing
FBQualifier.m: In function `-[FBKeyValueQualifier evaluateWithObject:]':
FBQualifier.m:390: warning: cannot find method.
FBQualifier.m:390: warning: return type for `isEqualTo:' defaults to id
FBQualifier.m:390: warning: pointer/integer type mismatch in conditional
expression
FBQualifier.m:390: warning: return makes integer from pointer without a
cast
FBQualifier.m:394: warning: cannot find method.
FBQualifier.m:394: warning: return type for `isNotEqualTo:' defaults to
id
FBQualifier.m:394: warning: return makes integer from pointer without a
cast
FBQualifier.m:396: warning: cannot find method.
FBQualifier.m:396: warning: return type for `isLessThan:' defaults to id
FBQualifier.m:396: warning: return makes integer from pointer without a
cast
FBQualifier.m:398: warning: cannot find method.
FBQualifier.m:398: warning: return type for `isGreaterThan:' defaults to
id
FBQualifier.m:398: warning: return makes integer from pointer without a
cast
FBQualifier.m:400: warning: cannot find method.
FBQualifier.m:400: warning: return type for `isLessThanOrEqualTo:'
defaults to id
...
Thanks,
Andreas
- Selectors and categories in GNUstep (porting from Cocoa), Andreas Hoeschler, 2002/05/08
- RE: Selectors and categories in GNUstep (porting from Cocoa), Mondragon, Ian, 2002/05/08
- Re: Selectors and categories in GNUstep (porting from Cocoa),
Andreas Hoeschler <=
- RE: Selectors and categories in GNUstep (porting from Cocoa), Mondragon, Ian, 2002/05/08
- RE: Selectors and categories in GNUstep (porting from Cocoa), Mondragon, Ian, 2002/05/09
- Fwd: Selectors and categories in GNUstep (porting from Cocoa), Richard Frith-Macdonald, 2002/05/09
- RE: Selectors and categories in GNUstep (porting from Cocoa), Mondragon, Ian, 2002/05/09