2002-08-04 18:00:11 +00:00
|
|
|
/** GSWComponentDefinition.m - <title>GSWeb: Class GSWComponentDefinition</title>
|
|
|
|
|
|
|
|
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
|
|
|
Date: Jan 1999
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
$Revision$
|
|
|
|
$Date$
|
2002-11-27 20:25:22 +00:00
|
|
|
$Id$
|
2002-08-04 18:00:11 +00:00
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
This file is part of the GNUstep Web Library.
|
|
|
|
|
2002-08-04 18:00:11 +00:00
|
|
|
<license>
|
2000-01-22 12:49:49 +00:00
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Library General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This library 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
|
|
|
|
Library General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
|
|
License along with this library; if not, write to the Free
|
|
|
|
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
2002-08-04 18:00:11 +00:00
|
|
|
</license>
|
|
|
|
**/
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2003-01-22 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/Makefile.postamble:
o use $(LN_S) -f in install-WO-headers
o added $(MKDIRS) $(GNUSTEP_HEADERS)/$(GSWExtensions_wo_HEADER_FILES_INSTALL_DIR);
* GSWExtensionsGSW.framework/Makefile.postamble: use $(LN_S) -f in install-WO-headers
2003-01-20 David Ayers <d.ayers@inode.at>
* Makefile.postamble
o added support for make gswnames=(gsw,wo,all) (corrected
typo)
o reinserted support for $(INSTALL_ROOT_DIR)
* config.h.in
o added HAVE_GDL2
* configure
o added support for --with-gswnames=(gsw,wo,all)
o set LIBWRAP during configure
o added config.mak.in as configurable file
* configure.ac
o (see configure)
* config.mak: removed (replaced by config.mak.in)
* config.mak.in: new file
o added support for make gswnames=(gsw,wo,all)
* gsweb.make.in
o add GSANTLR as auxiliary lib
o add gsweb libs to AUXILIARY_GSW_LIBS
o include correct extensions for GSW/WO-libs
* gsweb_wo.make: new file
* GSWeb/GSWConfig.h
o changed support for GSWEB_WONAMES
o conditionally import file GSWWOCompatiblity
here instead of in GSWeb.h
* GSWeb/GNUMakefile
o added support for make gswnames=(gsw,wo,all)
o ensure each lib gets built with its own object files
o removed deactivated framework extension determination code
o removed reference to unused files:
GSWeb.m, GSWWOCompatibility.m
o added references to new files:
GSWExtenstions.h, GSWExtWOCompatibility.h
o added support to create WO header files
* GSWeb/Makefile.postamble
o changed support to install WO header files according to
make gswnames=(gsw,wo,all)
o remove Makefile.preamble during distclean
* GSWeb/Makefile.preamble.in
o fixed typo
* GSWeb/GSWeb.h
o moved GSW/WO-Name-mapping to GSWWOCompatibility.h
o replaced inclusions of
<GSWeb/file.h> with "file.h"
* GSWeb/GSWeb.m: removed
* GSWeb/GSWWOCompatibility.h
o changed GSWEB_WONAMES handling
o removed hybrid namespace WO subclasses
o moved & reorganized GSW/WO-Name-mapping from GSWeb.h
o inlucluded missing GSW/WO-Name-mappings
* GSWeb/GSWWOCompatibility.m: removed
* GSWeb/*.m
o replaced inclusions of
<GSWeb/file.h> with "file.h"
* GSWeb/GSWApplication.m
o remove special GSW/WO handling of WOApp
* GSWeb/WebObject/WO*: removed
* GSWeb/WebObject/WebObjects
o replaced inclusions of
<GSWeb/file.h> with "file.h"
* GSWExtensions/GNUMakefile
o added support for make gswnames=(gsw,wo,all)
o ensure each lib gets built with its own object files
o removed deactivated framework extension determination code
o added references to new files:
GSWExtenstions.h, GSWExtWOCompatibility.h
o added support to create WO header files
* GSWExtensions/Makefile.preamble
o let gnustep make figure whether to link agains debug libs
o added support for make gswnames=(gsw,wo,all)
* GSWExtensions/Makefile.postamble
o changed support to install WO header files according to
make gswnames=(gsw,wo,all)
* GSWExtensions/*.m
o replaced inclusions of
<GSWeb/GSWeb.h> with "GSWExtWOCompatibility.h"
o replaces inclusions of
<GSWExtensions/file.h> with "file.h"
* GSWExtensions/GSWExtensions.h: new file
* GSWExtensions/WOExtensions.h: new file
* GSWExtensions/GSWExtWOCompatibility.h: new file
* GSWExtensionsGSW/GNUMakefile
o added support for make gswnames=(gsw,wo,all)
o ensure each lib gets built with its own object files
o removed deactivated framework extension determination code
o added references to new file GSWExtGSWWOCompatibility.h
o added support to create WO header files
* GSWExtensionsGSW/Makefile.pramble
o let gnustep make figure whether to link agains debug libs
o added support for make gswnames=(gsw,wo,all)
o removed GSWExtensions from ADDITIONAL_LIB_DIRS
* GSWExtensionsGSW/*.m
o replaced inclusions of
<GSWeb/GSWeb.h> with "GSWExtGSWWOCompatibility.h"
* GSWExtensions/GSWExtGSWWOCompatibility.h: new file
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@15675 72102866-910b-0410-8b05-ffd578937521
2003-01-22 12:24:26 +00:00
|
|
|
#include "GSWeb.h"
|
2000-01-22 12:49:49 +00:00
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWComponentDefinition
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(id)initWithName:(NSString*)aName
|
|
|
|
path:(NSString*)aPath
|
|
|
|
baseURL:(NSString*)baseURL
|
|
|
|
frameworkName:(NSString*)aFrameworkName
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGObjectFnStart();
|
|
|
|
if ((self=[super init]))
|
2002-07-27 23:48:47 +00:00
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
NSDebugMLLog(@"gswcomponents",@"aName=%@ aFrameworkName=%@",aName,aFrameworkName);
|
|
|
|
ASSIGN(_name,aName);
|
|
|
|
_bundle=[[GSWBundle alloc] initWithPath:aPath
|
|
|
|
baseURL:baseURL
|
|
|
|
inFrameworkNamed:aFrameworkName];
|
|
|
|
_observers=nil;
|
|
|
|
ASSIGN(_frameworkName,aFrameworkName);
|
|
|
|
NSDebugMLLog(@"gswcomponents",@"frameworkName=%@",_frameworkName);
|
|
|
|
ASSIGN(_templateName,aName);//TODOV
|
|
|
|
NSDebugMLLog(@"gswcomponents",@"templateName=%@",_templateName);
|
|
|
|
_componentClass=Nil;
|
|
|
|
_isScriptedClass=NO;
|
|
|
|
_isCachingEnabled=NO;
|
|
|
|
_isAwake=NO;
|
2002-07-27 23:48:47 +00:00
|
|
|
[self setCachingEnabled:[GSWApplication isCachingEnabled]];
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
|
|
|
return self;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(void)dealloc
|
|
|
|
{
|
|
|
|
GSWLogC("Dealloc GSWComponentDefinition");
|
|
|
|
GSWLogC("Dealloc GSWComponentDefinition: name");
|
2002-08-04 18:00:11 +00:00
|
|
|
DESTROY(_name);
|
2000-01-22 12:49:49 +00:00
|
|
|
GSWLogC("Dealloc GSWComponentDefinition: bundle");
|
2002-08-04 18:00:11 +00:00
|
|
|
DESTROY(_bundle);
|
2000-01-22 12:49:49 +00:00
|
|
|
GSWLogC("Dealloc GSWComponentDefinition: observers");
|
2002-08-04 18:00:11 +00:00
|
|
|
DESTROY(_observers);
|
2000-01-22 12:49:49 +00:00
|
|
|
GSWLogC("Dealloc GSWComponentDefinition: frameworkName");
|
2002-08-04 18:00:11 +00:00
|
|
|
DESTROY(_frameworkName);
|
2000-01-22 12:49:49 +00:00
|
|
|
GSWLogC("Dealloc GSWComponentDefinition: templateName");
|
2002-08-04 18:00:11 +00:00
|
|
|
DESTROY(_templateName);
|
2000-01-22 12:49:49 +00:00
|
|
|
GSWLogC("Dealloc GSWComponentDefinition: componentClass");
|
2002-08-04 18:00:11 +00:00
|
|
|
DESTROY(_componentClass);
|
2000-01-22 12:49:49 +00:00
|
|
|
GSWLogC("Dealloc GSWComponentDefinition Super");
|
|
|
|
[super dealloc];
|
|
|
|
GSWLogC("End Dealloc GSWComponentDefinition");
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(id)initWithCoder:(NSCoder*)coder
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2001-01-29 18:15:36 +00:00
|
|
|
if ((self = [super init]))
|
2002-08-04 18:00:11 +00:00
|
|
|
{
|
|
|
|
[coder decodeValueOfObjCType:@encode(id)
|
|
|
|
at:&_name];
|
|
|
|
[coder decodeValueOfObjCType:@encode(id)
|
|
|
|
at:&_bundle];
|
|
|
|
[coder decodeValueOfObjCType:@encode(id)
|
|
|
|
at:&_observers]; //TODOV
|
|
|
|
[coder decodeValueOfObjCType:@encode(id)
|
|
|
|
at:&_frameworkName];
|
|
|
|
[coder decodeValueOfObjCType:@encode(id)
|
|
|
|
at:&_templateName];
|
|
|
|
[coder decodeValueOfObjCType:@encode(Class)
|
|
|
|
at:&_componentClass];
|
|
|
|
[coder decodeValueOfObjCType:@encode(BOOL)
|
|
|
|
at:&_isScriptedClass];
|
|
|
|
[coder decodeValueOfObjCType:@encode(BOOL)
|
|
|
|
at:&_isCachingEnabled];
|
|
|
|
[coder decodeValueOfObjCType:@encode(BOOL)
|
|
|
|
at:&_isAwake];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
return self;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(void)encodeWithCoder:(NSCoder*)coder
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
[coder encodeObject:_name];
|
|
|
|
[coder encodeObject:_bundle];
|
|
|
|
[coder encodeObject:_observers]; //TODOV
|
|
|
|
[coder encodeObject:_frameworkName];
|
|
|
|
[coder encodeObject:_templateName];
|
|
|
|
[coder encodeValueOfObjCType:@encode(Class)
|
|
|
|
at:&_componentClass];
|
|
|
|
[coder encodeValueOfObjCType:@encode(BOOL)
|
|
|
|
at:&_isScriptedClass];
|
|
|
|
[coder encodeValueOfObjCType:@encode(BOOL)
|
|
|
|
at:&_isCachingEnabled];
|
|
|
|
[coder encodeValueOfObjCType:@encode(BOOL)
|
|
|
|
at:&_isAwake];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(id)copyWithZone:(NSZone*)zone
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
GSWComponentDefinition* clone = [[isa allocWithZone:zone] init];
|
2000-01-22 12:49:49 +00:00
|
|
|
if (clone)
|
2002-08-04 18:00:11 +00:00
|
|
|
{
|
|
|
|
ASSIGNCOPY(clone->_name,_name);
|
|
|
|
ASSIGNCOPY(clone->_bundle,_bundle);
|
|
|
|
ASSIGNCOPY(clone->_observers,_observers);
|
|
|
|
ASSIGNCOPY(clone->_frameworkName,_frameworkName);
|
|
|
|
ASSIGNCOPY(clone->_templateName,_templateName);
|
|
|
|
clone->_componentClass=_componentClass;
|
|
|
|
clone->_isScriptedClass=_isScriptedClass;
|
|
|
|
clone->_isCachingEnabled=_isCachingEnabled;
|
|
|
|
clone->_isAwake=_isAwake;
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
return clone;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)frameworkName
|
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
return _frameworkName;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)baseURL
|
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
return [_bundle baseURL];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)path
|
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
return [_bundle path];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)name
|
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
return _name;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)description
|
|
|
|
{
|
|
|
|
//TODO
|
|
|
|
return [NSString stringWithFormat:@"<%s %p - name:[%@] bundle:[%@] observers=[%@] frameworkName=[%@] templateName=[%@] componentClass=[%@] isScriptedClass=[%s] isCachingEnabled=[%s] isAwake=[%s]>",
|
|
|
|
object_get_class_name(self),
|
|
|
|
(void*)self,
|
2002-08-04 18:00:11 +00:00
|
|
|
_name,
|
|
|
|
_bundle,
|
|
|
|
_observers,
|
|
|
|
_frameworkName,
|
|
|
|
_templateName,
|
|
|
|
_componentClass,
|
|
|
|
_isScriptedClass ? "YES" : "NO",
|
|
|
|
_isCachingEnabled ? "YES" : "NO",
|
|
|
|
_isAwake ? "YES" : "NO"];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(void)sleep
|
|
|
|
{
|
|
|
|
//OK
|
|
|
|
LOGObjectFnStart();
|
2002-08-04 18:00:11 +00:00
|
|
|
_isAwake=NO;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(void)awake
|
|
|
|
{
|
|
|
|
//OK
|
2002-08-04 18:00:11 +00:00
|
|
|
BOOL isCachingEnabled=NO;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-08-04 18:00:11 +00:00
|
|
|
_isAwake=YES;
|
|
|
|
isCachingEnabled=[self isCachingEnabled];
|
|
|
|
if (!isCachingEnabled) //??
|
|
|
|
[self _clearCache];
|
2000-01-22 12:49:49 +00:00
|
|
|
//call self componentClass
|
|
|
|
LOGObjectFnNotImplemented(); //TODOFN
|
|
|
|
LOGObjectFnStop();
|
|
|
|
};
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWComponentDefinition (GSWCacheManagement)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(BOOL)isCachingEnabled
|
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
return _isCachingEnabled;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(void)setCachingEnabled:(BOOL)flag
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
_isCachingEnabled=flag;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWComponentDefinition (GSWComponentDefinitionA)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(void)_clearCache
|
|
|
|
{
|
|
|
|
//OK
|
|
|
|
LOGObjectFnStart();
|
2002-08-04 18:00:11 +00:00
|
|
|
[_bundle clearCache];
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
|
|
|
};
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWComponentDefinition (GSWComponentDefinitionB)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(GSWElement*)templateWithName:(NSString*)aName
|
|
|
|
languages:(NSArray*)languages
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
GSWElement* element=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-08-04 18:00:11 +00:00
|
|
|
element=[_bundle templateNamed:aName
|
|
|
|
languages:languages];
|
|
|
|
NSDebugMLLog(@"gswcomponents",@"aName=%@ languages=%@ element=%@",aName,languages,element);
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-08-04 18:00:11 +00:00
|
|
|
return element;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
/*
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(NSString*)stringForKey:(NSString*)key
|
|
|
|
inTableNamed:(NSString*)aName
|
|
|
|
withDefaultValue:(NSString*)defaultValue
|
|
|
|
languages:(NSArray*)languages
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
NSString* string=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-08-04 18:00:11 +00:00
|
|
|
string=[_bundle stringForKey:key
|
|
|
|
inTableNamed:aName
|
|
|
|
withDefaultValue:defaultValue
|
|
|
|
languages:languages];
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-08-04 18:00:11 +00:00
|
|
|
return string;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
2002-08-04 18:00:11 +00:00
|
|
|
-(NSDictionary*)stringsTableNamed:(NSString*)aName
|
|
|
|
withLanguages:(NSArray*)languages
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
NSDictionary* stringsTable=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-08-04 18:00:11 +00:00
|
|
|
stringsTable=[bundle stringsTableNamed:aName
|
|
|
|
withLanguages:languages];
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-08-04 18:00:11 +00:00
|
|
|
return stringsTable;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
2002-08-04 18:00:11 +00:00
|
|
|
-(NSArray*)stringsTableArrayNamed:(NSString*)aName
|
|
|
|
withLanguages:(NSArray*)languages
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
NSArray* stringsTableArray=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-08-04 18:00:11 +00:00
|
|
|
stringsTableArray=[bundle stringsTableArrayNamed:aName
|
|
|
|
withLanguages:languages];
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-08-04 18:00:11 +00:00
|
|
|
return stringsTableArray;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(NSString*)urlForResourceNamed:(NSString*)aName
|
|
|
|
ofType:(NSString*)type
|
|
|
|
languages:(NSArray*)languages
|
|
|
|
request:(GSWRequest*)request
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
NSString* url=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-08-04 18:00:11 +00:00
|
|
|
url=[bundle urlForResourceNamed:aName
|
|
|
|
ofType:type
|
|
|
|
languages:languages
|
|
|
|
request:request];
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-08-04 18:00:11 +00:00
|
|
|
return url;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
*/
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(NSString*)pathForResourceNamed:(NSString*)aName
|
|
|
|
ofType:(NSString*)aType
|
|
|
|
languages:(NSArray*)languages
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
NSString* path=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-08-04 18:00:11 +00:00
|
|
|
path=[_bundle pathForResourceNamed:aName
|
|
|
|
ofType:aType
|
|
|
|
languages:languages];
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-08-04 18:00:11 +00:00
|
|
|
return path;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWComponentDefinition (GSWComponentDefinitionC)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(GSWComponent*)componentInstanceInContext:(GSWContext*)aContext
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
//OK
|
2002-08-04 18:00:11 +00:00
|
|
|
GSWComponent* component=nil;
|
|
|
|
Class componentClass=nil;
|
|
|
|
NSMutableDictionary* threadDictionary=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-08-04 18:00:11 +00:00
|
|
|
NSAssert(aContext,@"No Context");
|
|
|
|
NSDebugMLLog(@"gswcomponents",@"aContext=%@",aContext);
|
2002-11-18 11:14:55 +00:00
|
|
|
|
|
|
|
// Get component class
|
2002-08-04 18:00:11 +00:00
|
|
|
componentClass=[self componentClass];
|
2003-01-22 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/Makefile.postamble:
o use $(LN_S) -f in install-WO-headers
o added $(MKDIRS) $(GNUSTEP_HEADERS)/$(GSWExtensions_wo_HEADER_FILES_INSTALL_DIR);
* GSWExtensionsGSW.framework/Makefile.postamble: use $(LN_S) -f in install-WO-headers
2003-01-20 David Ayers <d.ayers@inode.at>
* Makefile.postamble
o added support for make gswnames=(gsw,wo,all) (corrected
typo)
o reinserted support for $(INSTALL_ROOT_DIR)
* config.h.in
o added HAVE_GDL2
* configure
o added support for --with-gswnames=(gsw,wo,all)
o set LIBWRAP during configure
o added config.mak.in as configurable file
* configure.ac
o (see configure)
* config.mak: removed (replaced by config.mak.in)
* config.mak.in: new file
o added support for make gswnames=(gsw,wo,all)
* gsweb.make.in
o add GSANTLR as auxiliary lib
o add gsweb libs to AUXILIARY_GSW_LIBS
o include correct extensions for GSW/WO-libs
* gsweb_wo.make: new file
* GSWeb/GSWConfig.h
o changed support for GSWEB_WONAMES
o conditionally import file GSWWOCompatiblity
here instead of in GSWeb.h
* GSWeb/GNUMakefile
o added support for make gswnames=(gsw,wo,all)
o ensure each lib gets built with its own object files
o removed deactivated framework extension determination code
o removed reference to unused files:
GSWeb.m, GSWWOCompatibility.m
o added references to new files:
GSWExtenstions.h, GSWExtWOCompatibility.h
o added support to create WO header files
* GSWeb/Makefile.postamble
o changed support to install WO header files according to
make gswnames=(gsw,wo,all)
o remove Makefile.preamble during distclean
* GSWeb/Makefile.preamble.in
o fixed typo
* GSWeb/GSWeb.h
o moved GSW/WO-Name-mapping to GSWWOCompatibility.h
o replaced inclusions of
<GSWeb/file.h> with "file.h"
* GSWeb/GSWeb.m: removed
* GSWeb/GSWWOCompatibility.h
o changed GSWEB_WONAMES handling
o removed hybrid namespace WO subclasses
o moved & reorganized GSW/WO-Name-mapping from GSWeb.h
o inlucluded missing GSW/WO-Name-mappings
* GSWeb/GSWWOCompatibility.m: removed
* GSWeb/*.m
o replaced inclusions of
<GSWeb/file.h> with "file.h"
* GSWeb/GSWApplication.m
o remove special GSW/WO handling of WOApp
* GSWeb/WebObject/WO*: removed
* GSWeb/WebObject/WebObjects
o replaced inclusions of
<GSWeb/file.h> with "file.h"
* GSWExtensions/GNUMakefile
o added support for make gswnames=(gsw,wo,all)
o ensure each lib gets built with its own object files
o removed deactivated framework extension determination code
o added references to new files:
GSWExtenstions.h, GSWExtWOCompatibility.h
o added support to create WO header files
* GSWExtensions/Makefile.preamble
o let gnustep make figure whether to link agains debug libs
o added support for make gswnames=(gsw,wo,all)
* GSWExtensions/Makefile.postamble
o changed support to install WO header files according to
make gswnames=(gsw,wo,all)
* GSWExtensions/*.m
o replaced inclusions of
<GSWeb/GSWeb.h> with "GSWExtWOCompatibility.h"
o replaces inclusions of
<GSWExtensions/file.h> with "file.h"
* GSWExtensions/GSWExtensions.h: new file
* GSWExtensions/WOExtensions.h: new file
* GSWExtensions/GSWExtWOCompatibility.h: new file
* GSWExtensionsGSW/GNUMakefile
o added support for make gswnames=(gsw,wo,all)
o ensure each lib gets built with its own object files
o removed deactivated framework extension determination code
o added references to new file GSWExtGSWWOCompatibility.h
o added support to create WO header files
* GSWExtensionsGSW/Makefile.pramble
o let gnustep make figure whether to link agains debug libs
o added support for make gswnames=(gsw,wo,all)
o removed GSWExtensions from ADDITIONAL_LIB_DIRS
* GSWExtensionsGSW/*.m
o replaced inclusions of
<GSWeb/GSWeb.h> with "GSWExtGSWWOCompatibility.h"
* GSWExtensions/GSWExtGSWWOCompatibility.h: new file
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@15675 72102866-910b-0410-8b05-ffd578937521
2003-01-22 12:24:26 +00:00
|
|
|
NSAssert1(componentClass,@"No componentClass for:%@",NSStringFromClass([self class]));
|
2002-08-04 18:00:11 +00:00
|
|
|
NSDebugMLLog(@"gswcomponents",@"componentClass=%p",(void*)componentClass);
|
2002-11-18 11:14:55 +00:00
|
|
|
|
|
|
|
// Put the component definition in the thread dictionary because we need it during component initialization
|
2002-08-04 18:00:11 +00:00
|
|
|
threadDictionary=GSCurrentThreadDictionary();
|
|
|
|
[threadDictionary setObject:self
|
|
|
|
forKey:GSWThreadKey_ComponentDefinition];
|
2000-01-22 12:49:49 +00:00
|
|
|
NS_DURING
|
2002-08-04 18:00:11 +00:00
|
|
|
{
|
2002-11-18 11:14:55 +00:00
|
|
|
// Now, create the component by allocation a new instance of the class.
|
2002-08-04 18:00:11 +00:00
|
|
|
component=[[componentClass new] autorelease];
|
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
NS_HANDLER
|
2002-08-04 18:00:11 +00:00
|
|
|
{
|
|
|
|
LOGException(@"EXCEPTION:%@ (%@) [%s %d]",
|
|
|
|
localException,[localException reason],__FILE__,__LINE__);
|
|
|
|
[threadDictionary removeObjectForKey:GSWThreadKey_ComponentDefinition];
|
|
|
|
[localException raise];
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
NS_ENDHANDLER;
|
2002-11-18 11:14:55 +00:00
|
|
|
|
|
|
|
// Remove the component from the thread dictionary
|
2002-08-04 18:00:11 +00:00
|
|
|
[threadDictionary removeObjectForKey:GSWThreadKey_ComponentDefinition];
|
2000-01-22 12:49:49 +00:00
|
|
|
// [_component context];//so what ?
|
|
|
|
LOGObjectFnStop();
|
2002-08-04 18:00:11 +00:00
|
|
|
return component;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(Class)componentClass
|
|
|
|
{
|
|
|
|
//OK
|
|
|
|
return [self _componentClass];
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-11-18 11:14:55 +00:00
|
|
|
/** Find the class of the component **/
|
2000-01-22 12:49:49 +00:00
|
|
|
-(Class)_componentClass
|
|
|
|
{
|
|
|
|
//OK To Verify
|
2002-08-04 18:00:11 +00:00
|
|
|
Class componentClass=_componentClass;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-08-04 18:00:11 +00:00
|
|
|
NSDebugMLLog(@"gswcomponents",@"componentClass=%@",componentClass);
|
|
|
|
NSDebugMLLog(@"gswcomponents",@"name=%@",_name);
|
|
|
|
if (!componentClass)
|
|
|
|
componentClass=NSClassFromString(_name);//???
|
|
|
|
NSDebugMLLog(@"gswcomponents",@"componentClass=%@",componentClass);
|
2002-11-18 11:14:55 +00:00
|
|
|
NSDebugMLLog(@"gswcomponents",@"componentClass superclass=%@",[componentClass superclass]);
|
|
|
|
if (!componentClass) // There's no class with that name
|
2002-08-04 18:00:11 +00:00
|
|
|
{
|
|
|
|
BOOL createClassesOk=NO;
|
|
|
|
NSString* superClassName=nil;
|
|
|
|
if (!WOStrictFlag)
|
|
|
|
{
|
2002-11-18 11:14:55 +00:00
|
|
|
// Search component archive for a superclass (superClassName keyword)
|
2002-08-04 18:00:11 +00:00
|
|
|
NSDictionary* archive=[_bundle archiveNamed:_name];
|
|
|
|
NSDebugMLLog(@"gswcomponents",@"archive=%@",archive);
|
|
|
|
superClassName=[archive objectForKey:@"superClassName"];
|
|
|
|
NSDebugMLLog(@"gswcomponents",@"superClassName=%@",superClassName);
|
|
|
|
if (superClassName)
|
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
if (!NSClassFromString(superClassName))
|
|
|
|
{
|
|
|
|
ExceptionRaise(NSGenericException,@"Superclass %@ of component %@ doesn't exist",
|
|
|
|
superClassName,
|
|
|
|
_name);
|
|
|
|
};
|
2001-03-11 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWWOCompatibility.h/.m: added
* GSWeb.framework/GNUmakefile: added GSWWOCompatibility.h/.m
* GSWeb.framework/GSWApplication.h/m: added WOApplicationMain, handle WO/GSWeb names
* GSWeb.framework/GSWContext.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWConstants.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWDynamicURLString.m: handle WO/GSWeb names
* GSWeb.framework/GSWProjectBundle.m/.h: handle WO/GSWeb names, suppress warnings
* GSWeb.framework/GSWSession.m: handle WO/GSWeb names
* GSWeb.framework/GSWRequest.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParser.m: handle WO/GSWeb names,
added tag counts to help errors hunt
* GSWeb.framework/GSWBundle.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWResourceManager.m: handle WO/GSWeb names
* GSWeb.framework/GSWURLValuedElementData.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectAction.m: handle WO/GSWeb names
* GSWeb.framework/GSWForm.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWHyperlink.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWResourceRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWDirectActionRequestHandler.m: handle WO/GSWeb names
* GSWeb.framework/GSWActiveImage.m/.h: handle WO/GSWeb names
* GSWeb.framework/GSWBindingNameAssociation.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWBrowser.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponent.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWHTMLURLValuedElement.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWImageButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWInput.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWPopUpButton.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWString.h/.m: handle WO/GSWeb names
* GSWeb.framework/GSWAssociation.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBox.m: handle WO/GSWeb names
* GSWeb.framework/GSWCheckBoxList.m: handle WO/GSWeb names
* GSWeb.framework/GSWComponentDefinition.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButton.m: handle WO/GSWeb names
* GSWeb.framework/GSWRadioButtonList.m: handle WO/GSWeb names
* GSWeb.framework/GSWText.m: handle WO/GSWeb names
* GSWeb.framework/GSWTextField.m: handle WO/GSWeb names
* GSWeb.framework/GSWDeployedBundle.m: warnings
* GSWeb.framework/GSWeb.h: added include GSWeb/GSWSessionTimeOut.h, GSWWOCompatibility.h
* GSWeb.framework/GSWAdaptor.m: traces
* GSWeb.framework/GSWDefaultAdaptor.m: handle WO/GSWeb names, added traces
* GSWeb.framework/GSWDefaultAdaptorThread.m/.h: handle WO/GSWeb names
* GSWeb.framework/NSNonBlockingFileHandle.m: added traces
* GSWeb.framework/GSWTemplateParserANTLR.m: handle WO/GSWeb names
* GSWeb.framework/GSWTemplateParserXML.m: handle WO/GSWeb names
added tag count to help errors hunt
remove "Tag gsweb invalid" message
handle unicode strings in node content traces
remove html and body tags if they are not present in the template
* GSWeb.framework/GSWTemplateParseXML.h: added ivar _isHTMLTag, _isBodyTag
* GSWeb.framework/GSWSessionTimeOutManager.m: dealloc sessionOrderedTimeOuts instead
of deallocating 2 times sessionTimeOuts
* GSWExtensions.framework/French.lproj/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch, Encode french characters
* GSWExtensions.framework/GSWSessionRestorationErrorPage.gswc/GSWSessionRestorationErrorPage.html:
tag mismatch
* GSWHTMLBareString.m: handle unicode strings in description
* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
Encode french characters, Tag Mismatch
* GSWExtensions.framework/French.lproj/GSWPageRestorationErrorPage.gswc/GSWPageRestorationErrorPage.html:
Encode french characters
* GSWExtensions.framework/French.lproj/GSWSessionCreationErrorPage.gswc/GSWSessionCreationErrorPage.html:
Encode french characters
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
Tag Mismatch
* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
added convertHTMLEntities for strings
* GSWeb.framework/GSWRepetition.m: added traces, fix "count" property bug, standardize ivars
* GSWeb.framework/NSObject+IVarAccess+PerformSel.m: added traces, handle underscored ivars search
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@9332 72102866-910b-0410-8b05-ffd578937521
2001-03-11 17:15:44 +00:00
|
|
|
};
|
2002-08-04 18:00:11 +00:00
|
|
|
};
|
2002-11-18 11:14:55 +00:00
|
|
|
// If we haven't found a superclass, use GSWComponent as the superclass
|
2002-08-04 18:00:11 +00:00
|
|
|
if (!superClassName)
|
|
|
|
superClassName=@"GSWComponent";
|
2002-11-27 20:25:22 +00:00
|
|
|
NSDebugMLLog(@"gswcomponents",@"_name=%@ superClassName=%@",_name,superClassName);
|
2002-11-18 11:14:55 +00:00
|
|
|
|
|
|
|
// Create class
|
2002-08-04 18:00:11 +00:00
|
|
|
createClassesOk=[GSWApplication createUnknownComponentClasses:[NSArray arrayWithObject:_name]
|
|
|
|
superClassName:superClassName];
|
2002-11-18 11:14:55 +00:00
|
|
|
|
|
|
|
// Use it
|
2002-08-04 18:00:11 +00:00
|
|
|
componentClass=NSClassFromString(_name);
|
|
|
|
NSDebugMLLog(@"gswcomponents",@"componentClass=%p",(void*)componentClass);
|
|
|
|
};
|
2002-11-18 11:14:55 +00:00
|
|
|
//call GSWApp isCaching
|
2000-01-22 12:49:49 +00:00
|
|
|
NSDebugMLLog(@"gswcomponents",@"componentClass=%@",componentClass);
|
|
|
|
LOGObjectFnStop();
|
2002-08-04 18:00:11 +00:00
|
|
|
return componentClass;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(GSWComponentReference*)componentReferenceWithAssociations:(NSDictionary*)associations
|
|
|
|
template:(GSWElement*)template
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
//OK
|
2002-08-04 18:00:11 +00:00
|
|
|
GSWComponentReference* componentReference=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-08-04 18:00:11 +00:00
|
|
|
componentReference=[[[GSWComponentReference alloc]initWithName:_name
|
|
|
|
associations:associations
|
|
|
|
template:template] autorelease];
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-08-04 18:00:11 +00:00
|
|
|
return componentReference;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
|
|
|
-(NSDictionary*)componentAPI
|
|
|
|
{
|
2002-08-04 18:00:11 +00:00
|
|
|
NSDictionary* componentAPI=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-08-04 18:00:11 +00:00
|
|
|
componentAPI=[_bundle apiNamed:_name];
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-08-04 18:00:11 +00:00
|
|
|
return componentAPI;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWComponentDefinition (GSWComponentDefinitionD)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(void)_finishInitializingComponent:(GSWComponent*)component
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
//OK
|
2002-08-04 18:00:11 +00:00
|
|
|
NSDictionary* archive=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-08-04 18:00:11 +00:00
|
|
|
archive=[_bundle archiveNamed:_name];
|
|
|
|
[_bundle initializeObject:component
|
|
|
|
fromArchive:archive];
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
|
|
|
};
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWComponentDefinition (GSWComponentDefinitionE)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(void)_notifyObserversForDyingComponent:(GSWComponent*)aComponent
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGObjectFnNotImplemented(); //TODOFN
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(void)_awakeObserversForComponent:(GSWComponent*)aComponent
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGObjectFnNotImplemented(); //TODOFN
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(void)_deallocForComponent:(GSWComponent*)aComponent
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGObjectFnNotImplemented(); //TODOFN
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(void)_awakeForComponent:(GSWComponent*)aComponent
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGObjectFnNotImplemented(); //TODOFN
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
-(void)_registerObserver:(id)observer
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGObjectFnNotImplemented(); //TODOFN
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-08-04 18:00:11 +00:00
|
|
|
+(void)_registerObserver:(id)observer
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGClassFnNotImplemented(); //TODOFN
|
|
|
|
};
|
|
|
|
|
|
|
|
@end
|