From 32f96a67af132657627fbc988c21659ae65865d3 Mon Sep 17 00:00:00 2001 From: znek Date: Tue, 13 Mar 2007 07:11:44 +0000 Subject: [PATCH] reverted WORepetition 'list' extension git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1454 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-appserver/NGObjWeb/ChangeLog | 6 +++++ .../NGObjWeb/DynamicElements/WORepetition.m | 25 ++++--------------- .../NGObjWeb.xcodeproj/project.pbxproj | 6 ++--- sope-appserver/NGObjWeb/Version | 2 +- 4 files changed, 15 insertions(+), 24 deletions(-) diff --git a/sope-appserver/NGObjWeb/ChangeLog b/sope-appserver/NGObjWeb/ChangeLog index 4e57dc3e..fd215036 100644 --- a/sope-appserver/NGObjWeb/ChangeLog +++ b/sope-appserver/NGObjWeb/ChangeLog @@ -1,3 +1,9 @@ +2007-03-13 Marcus Mueller + + * WORepetition.m: Reverted 'list' binding extensions as this had side + effects with existing code. I advise using 'asArray' trampolines in + situations where the 'list extension' was helpful. (v4.7.4) + 2007-03-06 Helge Hess * Templates/WOWrapperTemplateBuilder.m: allow component classes in diff --git a/sope-appserver/NGObjWeb/DynamicElements/WORepetition.m b/sope-appserver/NGObjWeb/DynamicElements/WORepetition.m index e7e1ba6d..83e369f4 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WORepetition.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WORepetition.m @@ -137,8 +137,6 @@ static inline Class _classForConfig(NSDictionary *_config) { @implementation WORepetition -static Class NSArrayClass = Nil; - + (int)version { return [super version] + 1 /* v3 */; } @@ -147,8 +145,6 @@ static Class NSArrayClass = Nil; @"invalid superclass (%@) version %i !", NSStringFromClass([self superclass]), [super version]); - NSArrayClass = [NSArray class]; - if (debugTakeValues == -1) { debugTakeValues = [[NSUserDefaults standardUserDefaults] boolForKey:@"WODebugTakeValues"] @@ -261,8 +257,6 @@ _applyIdentifier(_WOComplexRepetition *self, #endif array = [self->list valueInComponent:sComponent]; - if ((array != nil) && ![array isKindOfClass:NSArrayClass]) - array = [NSArray arrayWithObject:array]; count = [array count]; if (count > 0) { @@ -303,8 +297,6 @@ _applyIndex(_WOComplexRepetition *self, WOComponent *sComponent, unsigned _idx) NSArray *array; array = [self->list valueInComponent:sComponent]; - if ((array != nil) && ![array isKindOfClass:NSArrayClass]) - array = [NSArray arrayWithObject:array]; if (self->index) [self->index setUnsignedIntValue:_idx inComponent:sComponent]; @@ -339,12 +331,10 @@ _applyIndex(_WOComplexRepetition *self, WOComponent *sComponent, unsigned _idx) #endif sComponent = [_ctx component]; - array = [self->list valueInContext:_ctx]; - if ((array != nil) && ![array isKindOfClass:NSArrayClass]) - array = [NSArray arrayWithObject:array]; - aCount = [array count]; + array = [self->list valueInContext:_ctx]; + aCount = [array count]; - goCount = self->count + goCount = self->count ? [self->count unsignedIntValueInComponent:sComponent] : aCount; @@ -487,13 +477,10 @@ _applyIndex(_WOComplexRepetition *self, WOComponent *sComponent, unsigned _idx) sComponent = [_ctx component]; array = [self->list valueInContext:_ctx]; - if ((array != nil) && ![array isKindOfClass:NSArrayClass]) - array = [NSArray arrayWithObject:array]; - aCount = [array count]; startIdx = [self->startIndex unsignedIntValueInComponent:sComponent]; - - goCount = self->count + + goCount = self->count ? [self->count unsignedIntValueInComponent:sComponent] : aCount; @@ -795,8 +782,6 @@ _sapplyIndex(_WOSimpleRepetition *self, WOComponent *sComponent, NSArray *array, sComponent = [_ctx component]; array = [self->list valueInContext:_ctx]; - if ((array != nil) && ![array isKindOfClass:NSArrayClass]) - array = [NSArray arrayWithObject:array]; aCount = [array count]; if (aCount > 0) { diff --git a/sope-appserver/NGObjWeb/NGObjWeb.xcodeproj/project.pbxproj b/sope-appserver/NGObjWeb/NGObjWeb.xcodeproj/project.pbxproj index 132f59fe..78bac319 100644 --- a/sope-appserver/NGObjWeb/NGObjWeb.xcodeproj/project.pbxproj +++ b/sope-appserver/NGObjWeb/NGObjWeb.xcodeproj/project.pbxproj @@ -2313,8 +2313,8 @@ isa = XCBuildConfiguration; buildSettings = { COPY_PHASE_STRIP = NO; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 4.7.255; + DYLIB_COMPATIBILITY_VERSION = 4.7.0; + DYLIB_CURRENT_VERSION = 4.7.4; FRAMEWORK_SEARCH_PATHS = "$(LOCAL_LIBRARY_DIR)/Frameworks"; FRAMEWORK_VERSION = A; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; @@ -2338,7 +2338,7 @@ OTHER_CFLAGS = ( "-DSOPE_MAJOR_VERSION=4", "-DSOPE_MINOR_VERSION=7", - "-DSOPE_SUBMINOR_VERSION=255", + "-DSOPE_SUBMINOR_VERSION=4", ); OTHER_LDFLAGS = ( "-seg1addr", diff --git a/sope-appserver/NGObjWeb/Version b/sope-appserver/NGObjWeb/Version index c765e0e4..b415afdf 100644 --- a/sope-appserver/NGObjWeb/Version +++ b/sope-appserver/NGObjWeb/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=3 +SUBMINOR_VERSION:=4 # v4.5.234 requires libDOM v4.5.21 # v4.5.214 requires libNGExtensions v4.5.179 -- 2.39.5