From: helge Date: Thu, 26 Aug 2004 14:29:46 +0000 (+0000) Subject: added ivar to WOComponent X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e883150ff2014f2e82d5cae8c83baf062c2501b;p=sope added ivar to WOComponent git-svn-id: http://svn.opengroupware.org/SOPE/trunk@61 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-appserver/NGObjWeb/ChangeLog b/sope-appserver/NGObjWeb/ChangeLog index 1db2d7a6..55035d78 100644 --- a/sope-appserver/NGObjWeb/ChangeLog +++ b/sope-appserver/NGObjWeb/ChangeLog @@ -1,10 +1,12 @@ 2004-08-26 Helge Hess + * WOComponent: added ivar for clientObject, _without_ increasing class + version (so that we don't need to touch every component in OGo :-| ), + moved SoObjects methods to own category file in SoObjects (v4.3.16) + * WOComponentScript.m, WOComponentScriptPart.m: removed dependency on NGScripting (disables WOx scripting due to missing backend) (v4.3.15) -2004-08-26 Helge Hess - * v4.3.14 * WOComponent.m, WOContext.m: added ivar for _ODCycleCtx, _without_ diff --git a/sope-appserver/NGObjWeb/NGObjWeb/WOComponent.h b/sope-appserver/NGObjWeb/NGObjWeb/WOComponent.h index bcdf6953..903edfc8 100644 --- a/sope-appserver/NGObjWeb/NGObjWeb/WOComponent.h +++ b/sope-appserver/NGObjWeb/NGObjWeb/WOComponent.h @@ -51,6 +51,7 @@ NSURL *wocBaseURL; id cycleContext; // was: _ODCycleCtx + id wocClientObject; } - (id)initWithContext:(WOContext *)_ctx; diff --git a/sope-appserver/NGObjWeb/SoObjects/GNUmakefile b/sope-appserver/NGObjWeb/SoObjects/GNUmakefile index 49462f60..fedd674a 100644 --- a/sope-appserver/NGObjWeb/SoObjects/GNUmakefile +++ b/sope-appserver/NGObjWeb/SoObjects/GNUmakefile @@ -1,4 +1,4 @@ -# $Id$ +# $Id: GNUmakefile 1 2004-08-20 10:08:27Z znek $ include $(GNUSTEP_MAKEFILES)/common.make @@ -66,6 +66,7 @@ SoObjects_OBJC_FILES = \ SoLookupAssociation.m \ WOContext+SoObjects.m \ WODirectAction+SoObjects.m \ + WOComponent+SoObjects.m \ WODirectActionRequestHandler+SoObjects.m\ WORequest+So.m \ SoTemplateRenderer.m \ diff --git a/sope-appserver/NGObjWeb/SoObjects/WOComponent+SoObjects.m b/sope-appserver/NGObjWeb/SoObjects/WOComponent+SoObjects.m new file mode 100644 index 00000000..da5259d8 --- /dev/null +++ b/sope-appserver/NGObjWeb/SoObjects/WOComponent+SoObjects.m @@ -0,0 +1,42 @@ +/* + Copyright (C) 2002-2004 SKYRIX Software AG + + This file is part of OpenGroupware.org. + + OGo is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + OGo is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with OGo; see the file COPYING. If not, write to the + Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. +*/ + +#include +#include "WOContext+SoObjects.h" +#include "common.h" + +@implementation WOComponent(SoObjects) + +static BOOL debugOn = NO; + +- (void)setClientObject:(id)_client { + if (debugOn) [self debugWithFormat:@"set client: %@", _client]; + ASSIGN(self->wocClientObject, _client); +} +- (id)clientObject { + if (self->wocClientObject != nil) + /* an explicit client object is set */ + return self->wocClientObject; + + return [[self context] clientObject]; +} + +@end /* WOComponent(SoObjects) */ diff --git a/sope-appserver/NGObjWeb/SoObjects/WOContext+SoObjects.m b/sope-appserver/NGObjWeb/SoObjects/WOContext+SoObjects.m index aa5458cc..0d52e86b 100644 --- a/sope-appserver/NGObjWeb/SoObjects/WOContext+SoObjects.m +++ b/sope-appserver/NGObjWeb/SoObjects/WOContext+SoObjects.m @@ -18,7 +18,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id: WOContext+SoObjects.m 4 2004-08-20 17:04:31Z helge $ #include "WOContext+SoObjects.h" #include "SoObjectRequestHandler.h" @@ -127,28 +126,3 @@ static BOOL debugOn = NO; } @end /* WOContext(SoObjectRequestHandler) */ - -@implementation WOComponent(SoObjects) - -- (void)setClientObject:(id)_client { - if (debugOn) [self debugWithFormat:@"set client: %@", _client]; - [self setObject:_client forKey:@"__soclient"]; -} -- (id)clientObject { - id client; - - if ((client = [self objectForKey:@"__soclient"])) - return client; - - return [[self context] clientObject]; -} - -@end /* WOComponent(SoObjects) */ - -@implementation WODirectAction(SoObjects) - -- (id)clientObject { - return [[(id)self context] clientObject]; -} - -@end /* WODirectAction(SoObjects) */ diff --git a/sope-appserver/NGObjWeb/SoObjects/WODirectAction+SoObjects.m b/sope-appserver/NGObjWeb/SoObjects/WODirectAction+SoObjects.m index 8379c2f7..3c877d20 100644 --- a/sope-appserver/NGObjWeb/SoObjects/WODirectAction+SoObjects.m +++ b/sope-appserver/NGObjWeb/SoObjects/WODirectAction+SoObjects.m @@ -1,7 +1,7 @@ /* - Copyright (C) 2000-2003 SKYRIX Software AG + Copyright (C) 2002-2004 SKYRIX Software AG - This file is part of OGo + This file is part of OpenGroupware.org. OGo is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the @@ -18,9 +18,9 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ #include +#include "WOContext+SoObjects.h" #include "SoObject.h" #include "common.h" @@ -34,6 +34,10 @@ @implementation WODirectAction(SoObjectRequestHandler) +- (id)clientObject { + return [[(id)self context] clientObject]; +} + - (id)lookupName:(NSString *)_name inContext:(id)_ctx acquire:(BOOL)_flag { WODirectActionPubInvocation *inv; NSString *daName; diff --git a/sope-appserver/NGObjWeb/Version b/sope-appserver/NGObjWeb/Version index 8a2dee4d..0f609cfb 100644 --- a/sope-appserver/NGObjWeb/Version +++ b/sope-appserver/NGObjWeb/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=15 +SUBMINOR_VERSION:=16 # v4.2.413 requires libSaxObjC v4.2.33 # v4.2.341 requires libNGExtensions v4.2.77 diff --git a/sope-appserver/NGObjWeb/WOComponent.m b/sope-appserver/NGObjWeb/WOComponent.m index b81edcd1..c366e583 100644 --- a/sope-appserver/NGObjWeb/WOComponent.m +++ b/sope-appserver/NGObjWeb/WOComponent.m @@ -147,6 +147,7 @@ static BOOL wakeupPageOnCreation = NO; withObject:nil]; [self->subcomponents release]; + [self->wocClientObject release]; [self->wocBindings release]; [self->wocVariables release]; [self->wocName release]; diff --git a/sope-appserver/WEExtensions/GNUmakefile.preamble b/sope-appserver/WEExtensions/GNUmakefile.preamble index 710e2324..5bc1ff2e 100644 --- a/sope-appserver/WEExtensions/GNUmakefile.preamble +++ b/sope-appserver/WEExtensions/GNUmakefile.preamble @@ -23,8 +23,9 @@ endif libWEExtensions_SOVERSION=$(MAJOR_VERSION).$(MINOR_VERSION) libWEExtensions_LIBRARIES_DEPEND_UPON += \ - -lNGObjWeb \ - -lNGMime -lNGStreams -lNGExtensions -lEOControl \ + -lNGObjWeb \ + -lNGMime \ + -lNGStreams -lNGExtensions -lEOControl \ -lXmlRpc -lDOM -lSaxObjC ifneq ($(GNUSTEP_BUILD_DIR),) @@ -58,6 +59,7 @@ endif WEExtensions_BUNDLE_LIBS += -lWEExtensions WEExtensions_WOBUNDLE_LIBS += $(WEExtensions_BUNDLE_LIBS) + ifneq ($(GNUSTEP_BUILD_DIR),) WEExtensions_LIB_DIRS += -L$(GNUSTEP_OBJ_DIR) else diff --git a/sope-appserver/WOExtensions/GNUmakefile.preamble b/sope-appserver/WOExtensions/GNUmakefile.preamble index 098d6a5f..2958345b 100644 --- a/sope-appserver/WOExtensions/GNUmakefile.preamble +++ b/sope-appserver/WOExtensions/GNUmakefile.preamble @@ -24,6 +24,7 @@ libWOExtensions_LIBRARIES_DEPEND_UPON += \ ifneq ($(GNUSTEP_BUILD_DIR),) RELBUILD_DIR_APPSERVER=$(GNUSTEP_BUILD_DIR)/.. +RELBUILD_DIR_MIME=$(GNUSTEP_BUILD_DIR)/../../sope-mime RELBUILD_DIR_SxCore=$(GNUSTEP_BUILD_DIR)/../../sope-core RELBUILD_DIR_SxXml=$(GNUSTEP_BUILD_DIR)/../../sope-xml @@ -31,7 +32,7 @@ ADDITIONAL_LIB_DIRS += \ -L$(GNUSTEP_OBJ_DIR) \ -L$(RELBUILD_DIR_APPSERVER)/WEExtensions/$(GNUSTEP_OBJ_DIR_NAME)\ -L$(RELBUILD_DIR_APPSERVER)/NGObjWeb/$(GNUSTEP_OBJ_DIR_NAME) \ - -L$(RELBUILD_DIR_SxCore)/NGMime/$(GNUSTEP_OBJ_DIR_NAME) \ + -L$(RELBUILD_DIR_MIME)/$(GNUSTEP_OBJ_DIR_NAME) \ -L$(RELBUILD_DIR_SxCore)/NGStreams/$(GNUSTEP_OBJ_DIR_NAME) \ -L$(RELBUILD_DIR_SxCore)/NGExtensions/$(GNUSTEP_OBJ_DIR_NAME) \ -L$(RELBUILD_DIR_SxCore)/EOControl/$(GNUSTEP_OBJ_DIR_NAME) \ diff --git a/sope-appserver/WOExtensions/JSModalWindow.m b/sope-appserver/WOExtensions/JSModalWindow.m index 3a0b632f..2e98c856 100644 --- a/sope-appserver/WOExtensions/JSModalWindow.m +++ b/sope-appserver/WOExtensions/JSModalWindow.m @@ -18,7 +18,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ #include