From 86295932bc0ca183dfb49a9bd978c1d7cf80faf4 Mon Sep 17 00:00:00 2001 From: helge Date: Thu, 9 Sep 2004 20:33:47 +0000 Subject: [PATCH] fixed OGo bug #888 git-svn-id: http://svn.opengroupware.org/SOPE/trunk@125 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-appserver/NGObjWeb/ChangeLog | 5 +++ .../NGObjWeb/DynamicElements/WOBrowser.m | 36 ++++++++++++------- .../NGObjWeb/DynamicElements/WOString.m | 2 +- sope-appserver/NGObjWeb/Version | 2 +- 4 files changed, 31 insertions(+), 14 deletions(-) diff --git a/sope-appserver/NGObjWeb/ChangeLog b/sope-appserver/NGObjWeb/ChangeLog index 9148a67c..8ef21790 100644 --- a/sope-appserver/NGObjWeb/ChangeLog +++ b/sope-appserver/NGObjWeb/ChangeLog @@ -1,3 +1,8 @@ +2004-09-09 Helge Hess + + * DynamicElements/WOBrowser.m: deprecated 'string' binding and + activated 'displayString' as requested in OGo bug #888 (v4.3.32) + 2004-09-09 Frank Reppin * GNUmakefile.postamble: added patch for installing in different diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOBrowser.m b/sope-appserver/NGObjWeb/DynamicElements/WOBrowser.m index 066c87c9..93a7435e 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOBrowser.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOBrowser.m @@ -18,7 +18,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ #include "WOInput.h" #include "common.h" @@ -34,13 +33,15 @@ WOAssociation *list; WOAssociation *item; WOAssociation *selection; - WOAssociation *string; // WO4 + WOAssociation *string; // WO4 => use 'displayString'! WOAssociation *noSelectionString; // WO4 // non-WO: WOAssociation *singleSelection; // selection contains an item, not an array WOAssociation *multiple; // multiple selections allowed WOAssociation *size; + + // TODO: WO 4.5: selectedValues, escapeHTML, selections } @end /* WOBrowser */ @@ -65,12 +66,23 @@ self->list = OWGetProperty(_config, @"list"); self->item = OWGetProperty(_config, @"item"); self->selection = OWGetProperty(_config, @"selection"); - self->string = OWGetProperty(_config, @"string"); self->singleSelection = OWGetProperty(_config, @"singleSelection"); self->multiple = OWGetProperty(_config, @"multiple"); self->size = OWGetProperty(_config, @"size"); self->noSelectionString = OWGetProperty(_config, @"noSelectionString"); - + + if ((self->string = OWGetProperty(_config, @"displayString")) == nil) { + if ((self->string = OWGetProperty(_config, @"string")) != nil) { + [self debugWithFormat: + @"Note: using deprecated 'string' binding, " + @"use 'displayString' instead."]; + } + } + else if (OWGetProperty(_config, @"string") != nil) { + [self debugWithFormat:@"WARNING: 'displayString' AND 'string' bindings " + @"are set, use only one! ('string' is deprecated!)"]; + } + // compatiblity if (self->noSelectionString == nil) self->noSelectionString = OWGetProperty(_config, @"nilString"); @@ -85,14 +97,14 @@ } - (void)dealloc { - RELEASE(self->noSelectionString); - RELEASE(self->singleSelection); - RELEASE(self->list); - RELEASE(self->item); - RELEASE(self->selection); - RELEASE(self->string); - RELEASE(self->size); - RELEASE(self->multiple); + [self->noSelectionString release]; + [self->singleSelection release]; + [self->list release]; + [self->item release]; + [self->selection release]; + [self->string release]; + [self->size release]; + [self->multiple release]; [super dealloc]; } diff --git a/sope-appserver/NGObjWeb/DynamicElements/WOString.m b/sope-appserver/NGObjWeb/DynamicElements/WOString.m index de38a5a8..648f6efc 100644 --- a/sope-appserver/NGObjWeb/DynamicElements/WOString.m +++ b/sope-appserver/NGObjWeb/DynamicElements/WOString.m @@ -403,7 +403,7 @@ static WOAssociation *yesAssoc = nil; if (self->nilString != nil && self->valueWhenEmpty != nil) { [self logWithFormat: @"WARNING: 'valueWhenEmpty' AND 'nilString' bindings are set, " - @"use only one! (nilString is deprecated!)"]; + @"use only one! ('nilString' is deprecated!)"]; } else if (self->nilString != nil) { [self debugWithFormat: diff --git a/sope-appserver/NGObjWeb/Version b/sope-appserver/NGObjWeb/Version index 3bdd746f..7fdcd491 100644 --- a/sope-appserver/NGObjWeb/Version +++ b/sope-appserver/NGObjWeb/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=31 +SUBMINOR_VERSION:=32 # v4.2.413 requires libSaxObjC v4.2.33 # v4.2.341 requires libNGExtensions v4.2.77 -- 2.39.5