From e564c789fcb8c55797b345d55f7aff31d4cdfdc3 Mon Sep 17 00:00:00 2001 From: helge Date: Fri, 18 Aug 2006 17:27:24 +0000 Subject: [PATCH] return mutable arrays in valueForKey: on mutable arrays git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1344 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-core/EOControl/ChangeLog | 5 +++++ sope-core/EOControl/EOKeyValueCoding.m | 6 +++++- sope-core/EOControl/Version | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/sope-core/EOControl/ChangeLog b/sope-core/EOControl/ChangeLog index 5315c2be..168583ed 100644 --- a/sope-core/EOControl/ChangeLog +++ b/sope-core/EOControl/ChangeLog @@ -1,3 +1,8 @@ +2006-08-18 Helge Hess + + * EOKeyValueCoding.m: -valueForKey: now returns mutable arrays when + being called on mutable arrays (WO 4.5 compatibility) (v4.5.67) + 2006-07-04 Helge Hess * 64bit fixes (v4.5.66) diff --git a/sope-core/EOControl/EOKeyValueCoding.m b/sope-core/EOControl/EOKeyValueCoding.m index a08e3f43..6530635e 100644 --- a/sope-core/EOControl/EOKeyValueCoding.m +++ b/sope-core/EOControl/EOKeyValueCoding.m @@ -998,12 +998,16 @@ static inline BOOL setValue(NSString* key, id instance, id value) } } - return [NSArray arrayWithObjects:objects count:cc]; + // TODO: possibly this checks fails on OSX + return [self isKindOfClass:[NSMutableArray class]] + ? [NSMutableArray arrayWithObjects:objects count:cc] + : [NSArray arrayWithObjects:objects count:cc]; } } @end /* NSArray(EOKeyValueCoding) */ + @implementation NSDictionary(EOKeyValueCoding) - (NSDictionary *)valuesForKeys:(NSArray *)keys { diff --git a/sope-core/EOControl/Version b/sope-core/EOControl/Version index bfe96d59..afdeafc4 100644 --- a/sope-core/EOControl/Version +++ b/sope-core/EOControl/Version @@ -1,3 +1,3 @@ # version file -SUBMINOR_VERSION:=66 +SUBMINOR_VERSION:=67 -- 2.39.5