+2006-09-30 Helge Hess <helge.hess@opengroupware.org>
+
+ * EOKeyGlobalID.m: print a warning if a key-gid is created with a nil
+ value, improved -description (v4.5.68)
+
2006-08-18 Helge Hess <helge.hess@opengroupware.org>
* EOKeyValueCoding.m: -valueForKey: now returns mutable arrays when
/*
- Copyright (C) 2000-2005 SKYRIX Software AG
+ Copyright (C) 2000-2006 SKYRIX Software AG
+ Copyright (C) 2006 Helge Hess
This file is part of SOPE.
kid->entityName = [_name copyWithZone:_zone];
kid->count = _count;
- for (i = 0; i < _count; i++)
+ for (i = 0; i < _count; i++) {
+#if DEBUG
+ if (_keyValues[i] == nil) {
+ NSLog(@"WARN(%s): got 'nil' as a EOKeyGlobalID value (entity=%@)!",
+ __PRETTY_FUNCTION__, _name);
+ }
+#endif
kid->values[i] = [_keyValues[i] retain];
+ }
return [kid autorelease];
}
self, NSStringFromClass([self class]),
[self entityName]];
- for (i = 0; i < self->count; i++) {
- if (i == 0) [s appendString:@" "];
- else [s appendString:@"/"];
- [s appendString:[self->values[i] stringValue]];
+ if (self->count == 0) {
+ [s appendString:@" no-key-values"];
+ }
+ else {
+ for (i = 0; i < self->count; i++) {
+ if (i == 0) [s appendString:@" "];
+ else [s appendString:@"/"];
+ if (self->values[i] == nil)
+ [s appendString:@"<nil>"];
+ else if (self->values[i] == nil)
+ [s appendString:@"<NSNull>"];
+ else
+ [s appendString:[self->values[i] stringValue]];
+ }
}
[s appendString:@">"];