[OGo-GNUstep-Port] exception when entering a project
Sebastian Reitenbach
gnustep-port@opengroupware.org
Wed, 28 Nov 2007 08:21:57 +0100
------=_=-_OpenGroupware_org_NGMime-16970-1196234517.533777-1------
content-type: text/plain; charset="us-ascii"
content-transfer-encoding: 7bit
content-length: 1583
Hi,
gnustep-port@opengroupware.org wrote:
> On 27.11.2007, at 15:53, Sebastian Reitenbach wrote:
> > (gdb) frame 1
> > #1 0x0ba90e28 in -[NSObject(KeyValueCoding)
> > setValue:forUndefinedKey:]
> > (self=0x86859688, _cmd=0x2bad3510,
> > anObject=0x86859768, aKey=0x7f6f27e8) at NSKeyValueCoding.m:415
> > 415 [self handleTakeValue: anObject forUnboundKey: aKey];
> > (gdb) print *self
> > $1 = {isa = 0x230d38a0}
> > (gdb) po self
> > <EOGenericRecord: description Project attributes={dbStatus = inserted;
> > endDate = "2028-12-30 23:00:00 +0000"; isFake = 0; kind = "<NSNull:
>
>
> I think we broke this with the last patch. EOGenericRecord does
> define -takeValue:forKey: which we now do not call anymore (but -
> setValue:forKey: instead).
> This seems to break all 'old style KVC' code. Notably this does NOT
> break on MacOS (which supports both styles [-setValue:forKey: first
> checks for -takeValue:forKey:]]). So I still consider that a basic GS
> issue.
>
>
> Anyways, adding this to EOGenericRecord.m might fix this specific
> issue, but probably others will pop up:
> ---snip---
> #if GNUSTEP_BASE_LIBRARY
> - (void)setValue:(id)_value forKey:(NSString *)_key {
> [self takeValue:_value forKey:_key];
> }
> #endif
> ---snap---
>
I added suggested snippet to sope-core/EOControl/EOGenericRecord.m, that
fixes the problem when clicking the + in the mail editor to add a new e-mail
address, but the exception still persists when trying to enter a project.
I tried with latest svn checkout of -base, as Marcus suggested.
sebastian
------=_=-_OpenGroupware_org_NGMime-16970-1196234517.533777-1------
content-disposition: inline; filename="save.patch-sope-core_EOControl_EOGenericRecord.m"
content-length: 392
content-transfer-encoding: 7bit
content-type: application/octet-stream; name="save.patch-sope-core_EOControl_EOGenericRecord.m"
--- ./sope-core/EOControl/EOGenericRecord.m Tue Nov 27 11:00:23 2007
+++ ./sope-core/EOControl/EOGenericRecord.m.new Tue Nov 27 18:02:58 2007
@@ -169,6 +169,11 @@
eoInsert(self, _key, _value);
}
}
+#if GNUSTEP_BASE_LIBRARY
+- (void)setValue:(id)_value forKey:(NSString *)_key {
+ [self takeValue:_value forKey:_key];
+}
+#endif
- (id)valueForKey:(NSString *)_key {
id v;
------=_=-_OpenGroupware_org_NGMime-16970-1196234517.533777-1--------