mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-05-31 17:20:57 +00:00
* GSWeb/GSWConstants.[hm]
add GSWClassName_Component * GSWeb/GSWComponentDefinition.m fix -componentClass to use GSWClassName_Component git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@37919 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3c024e08cd
commit
5d5c20e7e6
4 changed files with 27 additions and 31 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2014-05-29 Manuel Guesdon <mguesdon@orange-concept.com>
|
||||||
|
* GSWeb/GSWConstants.[hm]
|
||||||
|
add GSWClassName_Component
|
||||||
|
* GSWeb/GSWComponentDefinition.m
|
||||||
|
fix -componentClass to use GSWClassName_Component
|
||||||
2014-05-29 Manuel Guesdon <mguesdon@orange-concept.com>
|
2014-05-29 Manuel Guesdon <mguesdon@orange-concept.com>
|
||||||
* GSWDatabase/WODisplayGroup.m
|
* GSWDatabase/WODisplayGroup.m
|
||||||
respect GNUstep coding standard (curly brackets placement, indentation)
|
respect GNUstep coding standard (curly brackets placement, indentation)
|
||||||
|
|
|
@ -76,7 +76,7 @@ static GSWContext * TheTemporaryContext;
|
||||||
[super init];
|
[super init];
|
||||||
ASSIGN(_name, [aName stringByDeletingPathExtension]); // does it ever happen that
|
ASSIGN(_name, [aName stringByDeletingPathExtension]); // does it ever happen that
|
||||||
ASSIGN(_className, aName); // those are different? dw.
|
ASSIGN(_className, aName); // those are different? dw.
|
||||||
_componentClass = NSClassFromString(_className);
|
ASSIGN(_componentClass,NSClassFromString(_className));
|
||||||
ASSIGN(_path, aPath);
|
ASSIGN(_path, aPath);
|
||||||
ASSIGN(_url, baseURL);
|
ASSIGN(_url, baseURL);
|
||||||
ASSIGN(_frameworkName, aFrameworkName);
|
ASSIGN(_frameworkName, aFrameworkName);
|
||||||
|
@ -90,9 +90,11 @@ static GSWContext * TheTemporaryContext;
|
||||||
_instancePool = [NSMutableArray new];
|
_instancePool = [NSMutableArray new];
|
||||||
_lockInstancePool = [GSWApp isConcurrentRequestHandlingEnabled];
|
_lockInstancePool = [GSWApp isConcurrentRequestHandlingEnabled];
|
||||||
|
|
||||||
if ((_name != nil) && (_frameworkName != nil)) {
|
if (_name != nil
|
||||||
_componentClass = NSClassFromString(_className);
|
&& _frameworkName != nil)
|
||||||
}
|
{
|
||||||
|
ASSIGN(_componentClass,NSClassFromString(_className));
|
||||||
|
}
|
||||||
myBasePath = [aPath stringByAppendingPathComponent: aName];
|
myBasePath = [aPath stringByAppendingPathComponent: aName];
|
||||||
ASSIGN(_htmlPath,[myBasePath stringByAppendingPathExtension:@"html"]);
|
ASSIGN(_htmlPath,[myBasePath stringByAppendingPathExtension:@"html"]);
|
||||||
ASSIGN(_wodPath,[myBasePath stringByAppendingPathExtension:GSWComponentDeclarationsSuffix[GSWebNamingConv]]);
|
ASSIGN(_wodPath,[myBasePath stringByAppendingPathExtension:GSWComponentDeclarationsSuffix[GSWebNamingConv]]);
|
||||||
|
@ -135,7 +137,7 @@ static GSWContext * TheTemporaryContext;
|
||||||
DESTROY(_frameworkName);
|
DESTROY(_frameworkName);
|
||||||
DESTROY(_language);
|
DESTROY(_language);
|
||||||
DESTROY(_className);
|
DESTROY(_className);
|
||||||
_componentClass = Nil;
|
DESTROY(_componentClass);
|
||||||
DESTROY(_template);
|
DESTROY(_template);
|
||||||
DESTROY(_htmlPath);
|
DESTROY(_htmlPath);
|
||||||
DESTROY(_wodPath);
|
DESTROY(_wodPath);
|
||||||
|
@ -419,34 +421,21 @@ static GSWContext * TheTemporaryContext;
|
||||||
/** Find the class of the component **/
|
/** Find the class of the component **/
|
||||||
-(Class) componentClass
|
-(Class) componentClass
|
||||||
{
|
{
|
||||||
Class componentClass = Nil;
|
if (_componentClass==Nil)
|
||||||
|
{
|
||||||
if (_componentClass) {
|
ASSIGN(_componentClass,NSClassFromString(_name));
|
||||||
return _componentClass;
|
if (_componentClass==Nil) // There's no class with that name
|
||||||
}
|
{
|
||||||
|
BOOL createClassesOk=NO;
|
||||||
componentClass = _componentClass;
|
// Create class with GSWComponent as the superclass
|
||||||
if (!componentClass) {
|
createClassesOk=[GSWApplication createUnknownComponentClasses:[NSArray arrayWithObject:_name]
|
||||||
componentClass=NSClassFromString(_name);//???
|
superClassName:GSWClassName_Component[GSWebNamingConv]];
|
||||||
}
|
|
||||||
if (!componentClass) // There's no class with that name
|
|
||||||
{
|
|
||||||
BOOL createClassesOk=NO;
|
|
||||||
NSString* superClassName=nil;
|
|
||||||
// If we haven't found a superclass, use GSWComponent as the superclass
|
|
||||||
if (!superClassName)
|
|
||||||
superClassName=@"WOComponent";
|
|
||||||
// Create class
|
|
||||||
createClassesOk=[GSWApplication createUnknownComponentClasses:[NSArray arrayWithObject:_name]
|
|
||||||
superClassName:superClassName];
|
|
||||||
|
|
||||||
// Use it
|
ASSIGN(_componentClass,NSClassFromString(_name));
|
||||||
componentClass=NSClassFromString(_name);
|
};
|
||||||
};
|
}
|
||||||
//call GSWApp isCaching
|
|
||||||
_componentClass=componentClass;
|
|
||||||
|
|
||||||
return componentClass;
|
return _componentClass;
|
||||||
};
|
};
|
||||||
|
|
||||||
//--------------------------------------------------------------------
|
//--------------------------------------------------------------------
|
||||||
|
|
|
@ -94,6 +94,7 @@ GSWEB_EXPORT NSString* GSWClassName_Application;
|
||||||
GSWEB_EXPORT NSString* GSWClassName_ResourceManager[2];
|
GSWEB_EXPORT NSString* GSWClassName_ResourceManager[2];
|
||||||
GSWEB_EXPORT NSString* GSWClassName_StatisticsStore[2];
|
GSWEB_EXPORT NSString* GSWClassName_StatisticsStore[2];
|
||||||
GSWEB_EXPORT NSString* GSWClassName_ServerSessionStore[2];
|
GSWEB_EXPORT NSString* GSWClassName_ServerSessionStore[2];
|
||||||
|
GSWEB_EXPORT NSString* GSWClassName_Component[2];
|
||||||
GSWEB_EXPORT NSString* GSWClassName_DefaultAdaptor[2];
|
GSWEB_EXPORT NSString* GSWClassName_DefaultAdaptor[2];
|
||||||
GSWEB_EXPORT NSString* GSWClassName_DefaultContext[2];
|
GSWEB_EXPORT NSString* GSWClassName_DefaultContext[2];
|
||||||
GSWEB_EXPORT NSString* GSWClassName_DefaultResponse[2];
|
GSWEB_EXPORT NSString* GSWClassName_DefaultResponse[2];
|
||||||
|
|
|
@ -90,6 +90,7 @@ NSString* GSWClassName_Application=@"Application";
|
||||||
NSString* GSWClassName_ResourceManager[2]={ @"GSWResourceManager", @"WOResourceManager" };
|
NSString* GSWClassName_ResourceManager[2]={ @"GSWResourceManager", @"WOResourceManager" };
|
||||||
NSString* GSWClassName_StatisticsStore[2]={ @"GSWStatisticsStore", @"WOStatisticsStore" };
|
NSString* GSWClassName_StatisticsStore[2]={ @"GSWStatisticsStore", @"WOStatisticsStore" };
|
||||||
NSString* GSWClassName_ServerSessionStore[2]={ @"GSWServerSessionStore", @"WOServerSessionStore" };
|
NSString* GSWClassName_ServerSessionStore[2]={ @"GSWServerSessionStore", @"WOServerSessionStore" };
|
||||||
|
NSString* GSWClassName_Component[2]={ @"GSWComponent", @"WOComponent" };
|
||||||
NSString* GSWClassName_DefaultAdaptor[2]={ @"GSWDefaultAdaptor", @"WODefaultAdaptor" };
|
NSString* GSWClassName_DefaultAdaptor[2]={ @"GSWDefaultAdaptor", @"WODefaultAdaptor" };
|
||||||
NSString* GSWClassName_DefaultContext[2]={ @"GSWContext", @"WOContext" };
|
NSString* GSWClassName_DefaultContext[2]={ @"GSWContext", @"WOContext" };
|
||||||
NSString* GSWClassName_DefaultResponse[2]={ @"GSWResponse", @"WOResponse" };
|
NSString* GSWClassName_DefaultResponse[2]={ @"GSWResponse", @"WOResponse" };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue