[OGo-GNUstep-Port] postgresql adapter exception while entering a project
Sebastian Reitenbach
gnustep-port@opengroupware.org
Mon, 04 Jun 2007 06:55:38 +0200
Hi,
I added some lines for debugging:
if (len < 4) { /* apparently this is 'INT'? */
if (debugOn) NSLog(@" type len < 4 (%@), return string", _type);
#if GNUSTEP_BASE_LIBRARY
/*
on gstep-base -stringValue of bool's return YES or NO, which seems to
be different on Cocoa and liBFoundation.
*/
{
Class BoolClass = Nil;
NSLog(@"sope/sope-gdl1/PostgreSQL/NSNumber+PGVal.m: here in
GNUSTEP_BASE_LIBRARY!!! self class: %@", [self class]);
if (BoolClass == Nil) BoolClass = NSClassFromString(@"NSBoolNumber");
if ([self isKindOfClass:BoolClass])
return [self boolValue] ? @"1" : @"0";
}
#endif
NSLog(@"sope/sope-gdl1/PostgreSQL/NSNumber+PGVal.m: not a
GNUSTEP_BASE_LIBRARY!!!");
return [self stringValue];
}
This is the outcome:
2007-06-04 06:43:09.312 ogo-webui-1.1[1563]
sope/sope-gdl1/PostgreSQL/NSNumber+PGVal.m: here in GNUSTEP_BASE_LIBRARY!!!
self class: NSIntNumber
2007-06-04 06:43:09.312 ogo-webui-1.1[1563]
sope/sope-gdl1/PostgreSQL/NSNumber+PGVal.m: not a GNUSTEP_BASE_LIBRARY!!!
obviously if ([self isKindOfClass:BoolClass])
return [self boolValue] ? @"1" : @"0";
doesn't work.
kind regards
Sebastian