mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-02-21 02:41:04 +00:00
2002-03-25 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWAdaptors/common/GSWConfig.c: changed comments * GSWeb.framework/GSWSwitchComponent.h/.m: o ivar names changes to conform to coding standards o logs * GSWeb.framework/GSWComponentContent.h/.m: o ivar names changes to conform to coding standards o logs * GSWAdaptors/common/GSWTemplates.c: o change .gif to .png * GSWeb.framework/GSWAssociation.m: o Added Key/Value association conversion in associationsSetValuesFromObject:inObject: * GSWeb.framework/GSWKeyValueAssociation.m: o removed validateValue in -setValue:inObject: o logs * GSWeb.framework/GSWConstantValueAssociation.m o logs git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@13232 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
cf1cf734e8
commit
8eb89c4db1
19 changed files with 815 additions and 701 deletions
19
ChangeLog
19
ChangeLog
|
@ -1,3 +1,22 @@
|
|||
2002-03-25 Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
|
||||
* GSWAdaptors/common/GSWConfig.c: changed comments
|
||||
* GSWeb.framework/GSWSwitchComponent.h/.m:
|
||||
o ivar names changes to conform to coding standards
|
||||
o logs
|
||||
* GSWeb.framework/GSWComponentContent.h/.m:
|
||||
o ivar names changes to conform to coding standards
|
||||
o logs
|
||||
* GSWAdaptors/common/GSWTemplates.c:
|
||||
o change .gif to .png
|
||||
* GSWeb.framework/GSWAssociation.m:
|
||||
o Added Key/Value association conversion in associationsSetValuesFromObject:inObject:
|
||||
* GSWeb.framework/GSWKeyValueAssociation.m:
|
||||
o removed validateValue in -setValue:inObject:
|
||||
o logs
|
||||
* GSWeb.framework/GSWConstantValueAssociation.m
|
||||
o logs
|
||||
|
||||
2002-03-07 Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
|
||||
* GSWeb.framework/GSWAdaptor.h/.m:
|
||||
|
|
|
@ -165,10 +165,10 @@ CONST char* GSWConfig_GetConfigFilePath()
|
|||
|
||||
/*{
|
||||
canDumpStatus=NO;
|
||||
GSWExtensionsFrameworkWebServerResources="/GSW/GSWExtensions/WebServerResources"
|
||||
GSWExtensionsFrameworkWebServerResources="/GSW/GSWExtensions/Resources/WebServer"
|
||||
applications= {
|
||||
MyApp1 = {
|
||||
GSWExtensionsFrameworkWebServerResources="/GSW/GSWExtensions/WebServerResources"
|
||||
GSWExtensionsFrameworkWebServerResources="/GSW/GSWExtensions/Resources/WebServer"
|
||||
instances = {
|
||||
1 = {
|
||||
host=12.13.14.15;
|
||||
|
|
|
@ -39,7 +39,7 @@ const char* g_szErrorResponseTextTemplate[2]={
|
|||
"<HTML><BODY BGCOLOR=\"#FFFFFF\">\n"
|
||||
"<CENTER><H1>##TEXT##</H1></CENTER>\n"
|
||||
"<BR>\n"
|
||||
"<CENTER><A HREF=\"http://www.gnustepweb.org\"><IMG SRC=\"##GSWEXTFWKWSR##/PoweredByGNUstepWeb.gif\" ALT=\"Powered By GNUstepWeb\" BORDER=0></A></CENTER>\n"
|
||||
"<CENTER><A HREF=\"http://www.gnustepweb.org\"><IMG SRC=\"##GSWEXTFWKWSR##/PoweredByGNUstepWeb.png\" ALT=\"Powered By GNUstepWeb\" BORDER=0></A></CENTER>\n"
|
||||
"</BODY></HTML>\n"};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -62,7 +62,7 @@ const char* g_szStatusResponseAllowedTemplate[2]={
|
|||
"<p><strong>Headers:</strong><br>\n"
|
||||
"##HEADERS##\n"
|
||||
"<BR>\n"
|
||||
"<CENTER><A HREF=\"http://www.gnustepweb.org\"><IMG SRC=\"##GSWEXTFWKWSR##/PoweredByGNUstepWeb.gif\" ALT=\"Powered By GNUstepWeb\" BORDER=0></A></CENTER>\n"
|
||||
"<CENTER><A HREF=\"http://www.gnustepweb.org\"><IMG SRC=\"##GSWEXTFWKWSR##/PoweredByGNUstepWeb.png\" ALT=\"Powered By GNUstepWeb\" BORDER=0></A></CENTER>\n"
|
||||
"</BODY></HTML>\n"};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -73,7 +73,7 @@ const char* g_szStatusResponseDeniedTemplate[2]={
|
|||
"<BODY BGCOLOR=\"#FFFFFF\">\n"
|
||||
"<CENTER><H1>Don't play with me ##REMOTE_ADDR## ##REMOTE_HOST##, I'll win!</H1></CENTER>"
|
||||
"<BR>\n"
|
||||
"<CENTER><A HREF=\"http://www.gnustepweb.org\"><IMG SRC=\"##GSWEXTFWKWSR##/PoweredByGNUstepWeb.gif\" ALT=\"Powered By GNUstepWeb\" BORDER=0></A></CENTER>\n"
|
||||
"<CENTER><A HREF=\"http://www.gnustepweb.org\"><IMG SRC=\"##GSWEXTFWKWSR##/PoweredByGNUstepWeb.png\" ALT=\"Powered By GNUstepWeb\" BORDER=0></A></CENTER>\n"
|
||||
"</BODY></HTML>\n"};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -100,7 +100,7 @@ const char* g_szDump_FootTemplate[2]={
|
|||
"",
|
||||
"</table></CENTER>\n"
|
||||
"<BR>\n"
|
||||
"<CENTER><A HREF=\"http://www.gnustepweb.org\"><IMG SRC=\"##GSWEXTFWKWSR##/PoweredByGNUstepWeb.gif\" ALT=\"Powered By GNUstepWeb\" BORDER=0></A></CENTER>\n"
|
||||
"<CENTER><A HREF=\"http://www.gnustepweb.org\"><IMG SRC=\"##GSWEXTFWKWSR##/PoweredByGNUstepWeb.png\" ALT=\"Powered By GNUstepWeb\" BORDER=0></A></CENTER>\n"
|
||||
"</BODY></HTML>"};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
|
@ -151,7 +151,6 @@ GSWExtensions_AGSDOC_FILES = gswextensions.gsdoc $(GSWExtensions_AUTOGSDOC_HEADE
|
|||
GSWExtensions_AGSDOC_FLAGS = \
|
||||
-Declared Foundation \
|
||||
-Standards YES \
|
||||
-SystemProjects System \
|
||||
-Project gswextensions \
|
||||
-WordMap '{\
|
||||
FOUNDATION_EXPORT=extern;FOUNDATION_STATIC_INLINE="";\
|
||||
|
@ -161,6 +160,7 @@ GSWExtensions_AGSDOC_FLAGS = \
|
|||
GS_ZONE_SCOPE=extern;GS_ZONE_ATTR="";\
|
||||
}' -Up gswextensions
|
||||
|
||||
# -SystemProjects System \
|
||||
|
||||
#DIST_FILES = $(SRCS) $(HDRS) GNUmakefile Makefile.postamble Makefile.preamble
|
||||
|
||||
|
|
|
@ -90,7 +90,6 @@ GSWExtensionsGSW_AGSDOC_FILES = gswextensionsgsw.gsdoc $(GSWExtensionsGSW_AUTOGS
|
|||
GSWExtensionsGSW_AGSDOC_FLAGS = \
|
||||
-Declared Foundation \
|
||||
-Standards YES \
|
||||
-SystemProjects System \
|
||||
-Project gswextensionsgsw \
|
||||
-WordMap '{\
|
||||
FOUNDATION_EXPORT=extern;FOUNDATION_STATIC_INLINE="";\
|
||||
|
@ -100,6 +99,8 @@ GSWExtensionsGSW_AGSDOC_FLAGS = \
|
|||
GS_ZONE_SCOPE=extern;GS_ZONE_ATTR="";\
|
||||
}' -Up gswextensionsgsw
|
||||
|
||||
# -SystemProjects System \
|
||||
|
||||
#DIST_FILES = $(SRCS) $(HDRS) GNUmakefile Makefile.postamble Makefile.preamble
|
||||
|
||||
-include Makefile.preamble
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWActiveImage.h - GSWeb: Class GSWActiveImage
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWActiveImage.h - <title>GSWeb: Class GSWActiveImage</title>
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
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
|
||||
|
@ -19,7 +25,8 @@
|
|||
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.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
// $Id$
|
||||
|
||||
|
@ -29,28 +36,28 @@
|
|||
//====================================================================
|
||||
@interface GSWActiveImage: GSWInput
|
||||
{
|
||||
GSWAssociation* imageMapFileName;
|
||||
GSWAssociation* _imageMapFileName;
|
||||
|
||||
//GSWeb Additions {
|
||||
GSWAssociation* imageMapString;
|
||||
GSWAssociation* imageMapRegions;
|
||||
GSWAssociation* _imageMapString;
|
||||
GSWAssociation* _imageMapRegions;
|
||||
// }
|
||||
GSWAssociation* action;
|
||||
GSWAssociation* href;
|
||||
GSWAssociation* src;
|
||||
GSWAssociation* xAssoc;
|
||||
GSWAssociation* yAssoc;
|
||||
GSWAssociation* target;
|
||||
GSWAssociation* filename;
|
||||
GSWAssociation* framework;
|
||||
GSWAssociation* data;
|
||||
GSWAssociation* mimeType;
|
||||
GSWAssociation* key;
|
||||
GSWAssociation* _action;
|
||||
GSWAssociation* _href;
|
||||
GSWAssociation* _src;
|
||||
GSWAssociation* _xAssoc;
|
||||
GSWAssociation* _yAssoc;
|
||||
GSWAssociation* _target;
|
||||
GSWAssociation* _filename;
|
||||
GSWAssociation* _framework;
|
||||
GSWAssociation* _data;
|
||||
GSWAssociation* _mimeType;
|
||||
GSWAssociation* _key;
|
||||
};
|
||||
|
||||
-(id)initWithName:(NSString*)name_
|
||||
associations:(NSDictionary*)associations_
|
||||
contentElements:(NSArray*)elements_;
|
||||
-(id)initWithName:(NSString*)name
|
||||
associations:(NSDictionary*)associations
|
||||
contentElements:(NSArray*)elements;
|
||||
-(NSString*)elementName;
|
||||
-(NSString*)description;
|
||||
-(void)dealloc;
|
||||
|
@ -59,38 +66,38 @@
|
|||
|
||||
//====================================================================
|
||||
@interface GSWActiveImage (GSWActiveImageA)
|
||||
-(GSWAssociation*)hitTestX:(int)x_
|
||||
y:(int)y_
|
||||
inRegions:(NSArray*)regions_;
|
||||
-(GSWAssociation*)hitTestX:(int)x
|
||||
y:(int)y
|
||||
inRegions:(NSArray*)regions;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWActiveImage (GSWActiveImageB)
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)aContext;
|
||||
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)aContext;
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)aContext;
|
||||
|
||||
-(NSString*)frameworkNameInContext:(GSWContext*)context_;
|
||||
-(NSString*)imageSourceInContext:(GSWContext*)context_; //NDFN
|
||||
-(NSString*)hrefInContext:(GSWContext*)context_; //NDFN
|
||||
-(NSString*)frameworkNameInContext:(GSWContext*)aContext;
|
||||
-(NSString*)imageSourceInContext:(GSWContext*)aContext; //NDFN
|
||||
-(NSString*)hrefInContext:(GSWContext*)aContext; //NDFN
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWActiveImage (GSWActiveImageC)
|
||||
-(void)appendGSWebObjectsAssociationsToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_;
|
||||
inContext:(GSWContext*)aContext;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWActiveImage (GSWActiveImageD)
|
||||
-(BOOL)appendStringAtRight:(id)_unkwnon
|
||||
withMapping:(char*)_mapping;
|
||||
-(BOOL)appendStringAtLeft:(id)_unkwnon
|
||||
withMapping:(char*)_mapping;
|
||||
-(BOOL)appendStringAtRight:(id)unkwnon
|
||||
withMapping:(char*)mapping;
|
||||
-(BOOL)appendStringAtLeft:(id)unkwnon
|
||||
withMapping:(char*)mapping;
|
||||
@end
|
||||
|
||||
#endif //_GSWActiveImage_h__
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWActiveImage.m - GSWeb: Class GSWActiveImage
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWActiveImage.m - <title>GSWeb: Class GSWActiveImage</title>
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
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
|
||||
|
@ -19,7 +25,8 @@
|
|||
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.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
static char rcsId[] = "$Id$";
|
||||
|
||||
|
@ -29,127 +36,128 @@ static char rcsId[] = "$Id$";
|
|||
@implementation GSWActiveImage
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithName:(NSString*)name_
|
||||
associations:(NSDictionary*)associations_
|
||||
contentElements:(NSArray*)elements_
|
||||
-(id)initWithName:(NSString*)aName
|
||||
associations:(NSDictionary*)Xassociations
|
||||
contentElements:(NSArray*)elements
|
||||
{
|
||||
//OK
|
||||
NSMutableDictionary* _associations=nil;
|
||||
NSMutableDictionary* tmpAssociations=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLog(@"name_=%@ associations_:%@ elements_=%@",name_,associations_,elements_);
|
||||
_associations=[NSMutableDictionary dictionaryWithDictionary:associations_];
|
||||
[_associations removeObjectForKey:imageMapFileName__Key];
|
||||
NSDebugMLog(@"name=%@ Xassociations:%@ elements_=%@",
|
||||
aName,Xassociations,elements);
|
||||
tmpAssociations=[NSMutableDictionary dictionaryWithDictionary:Xassociations];
|
||||
[tmpAssociations removeObjectForKey:imageMapFileName__Key];
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
[_associations removeObjectForKey:imageMapString__Key];
|
||||
[_associations removeObjectForKey:imageMapRegions__Key];
|
||||
[tmpAssociations removeObjectForKey:imageMapString__Key];
|
||||
[tmpAssociations removeObjectForKey:imageMapRegions__Key];
|
||||
};
|
||||
[_associations removeObjectForKey:action__Key];
|
||||
[_associations removeObjectForKey:href__Key];
|
||||
[_associations removeObjectForKey:src__Key];
|
||||
[_associations removeObjectForKey:x__Key];
|
||||
[_associations removeObjectForKey:y__Key];
|
||||
[_associations removeObjectForKey:target__Key];
|
||||
[_associations removeObjectForKey:filename__Key];
|
||||
[_associations removeObjectForKey:framework__Key];
|
||||
[_associations removeObjectForKey:data__Key];
|
||||
[_associations removeObjectForKey:mimeType__Key];
|
||||
[_associations removeObjectForKey:key__Key];
|
||||
[tmpAssociations removeObjectForKey:action__Key];
|
||||
[tmpAssociations removeObjectForKey:href__Key];
|
||||
[tmpAssociations removeObjectForKey:src__Key];
|
||||
[tmpAssociations removeObjectForKey:x__Key];
|
||||
[tmpAssociations removeObjectForKey:y__Key];
|
||||
[tmpAssociations removeObjectForKey:target__Key];
|
||||
[tmpAssociations removeObjectForKey:filename__Key];
|
||||
[tmpAssociations removeObjectForKey:framework__Key];
|
||||
[tmpAssociations removeObjectForKey:data__Key];
|
||||
[tmpAssociations removeObjectForKey:mimeType__Key];
|
||||
[tmpAssociations removeObjectForKey:key__Key];
|
||||
|
||||
if ((self=[super initWithName:name_
|
||||
associations:_associations
|
||||
contentElements:elements_]))
|
||||
{
|
||||
int _imageMapDefNb=0;
|
||||
imageMapFileName = [[associations_ objectForKey:imageMapFileName__Key
|
||||
withDefaultObject:[imageMapFileName autorelease]] retain];
|
||||
if (imageMapFileName)
|
||||
_imageMapDefNb++;
|
||||
|
||||
if (!WOStrictFlag)
|
||||
if ((self=[super initWithName:aName
|
||||
associations:tmpAssociations
|
||||
contentElements:elements]))
|
||||
{
|
||||
int imageMapDefNb=0;
|
||||
_imageMapFileName = [[Xassociations objectForKey:imageMapFileName__Key
|
||||
withDefaultObject:[_imageMapFileName autorelease]] retain];
|
||||
if (_imageMapFileName)
|
||||
imageMapDefNb++;
|
||||
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
_imageMapString = [[Xassociations objectForKey:imageMapString__Key
|
||||
withDefaultObject:[_imageMapString autorelease]] retain];
|
||||
if (_imageMapString)
|
||||
imageMapDefNb++;
|
||||
|
||||
_imageMapRegions = [[Xassociations objectForKey:imageMapRegions__Key
|
||||
withDefaultObject:[_imageMapRegions autorelease]] retain];
|
||||
if (_imageMapRegions)
|
||||
imageMapDefNb++;
|
||||
if (imageMapDefNb>0)
|
||||
{
|
||||
imageMapString = [[associations_ objectForKey:imageMapString__Key
|
||||
withDefaultObject:[imageMapString autorelease]] retain];
|
||||
if (imageMapString)
|
||||
_imageMapDefNb++;
|
||||
|
||||
imageMapRegions = [[associations_ objectForKey:imageMapRegions__Key
|
||||
withDefaultObject:[imageMapRegions autorelease]] retain];
|
||||
if (imageMapRegions)
|
||||
_imageMapDefNb++;
|
||||
if (_imageMapDefNb>0)
|
||||
{
|
||||
ExceptionRaise(@"GSWActiveImage",@"you can't specify %@, %@ and %@",
|
||||
imageMapFileName__Key,
|
||||
imageMapString__Key,
|
||||
imageMapRegions__Key);
|
||||
};
|
||||
};
|
||||
action = [[associations_ objectForKey:action__Key
|
||||
withDefaultObject:[action autorelease]] retain];
|
||||
|
||||
href = [[associations_ objectForKey:href__Key
|
||||
withDefaultObject:[href autorelease]] retain];
|
||||
|
||||
src = [[associations_ objectForKey:src__Key
|
||||
withDefaultObject:[src autorelease]] retain];
|
||||
|
||||
xAssoc = [[associations_ objectForKey:x__Key
|
||||
withDefaultObject:[xAssoc autorelease]] retain];
|
||||
if (xAssoc && ![xAssoc isValueSettable])
|
||||
{
|
||||
ExceptionRaise0(@"GSWActiveImage",@"'x' parameter must be settable");
|
||||
};
|
||||
|
||||
yAssoc = [[associations_ objectForKey:y__Key
|
||||
withDefaultObject:[yAssoc autorelease]] retain];
|
||||
if (yAssoc && ![yAssoc isValueSettable])
|
||||
{
|
||||
ExceptionRaise0(@"GSWActiveImage",@"'y' parameter must be settable");
|
||||
};
|
||||
|
||||
target = [[associations_ objectForKey:target__Key
|
||||
withDefaultObject:[target autorelease]] retain];
|
||||
|
||||
filename = [[associations_ objectForKey:filename__Key
|
||||
withDefaultObject:[filename autorelease]] retain];
|
||||
|
||||
framework = [[associations_ objectForKey:framework__Key
|
||||
withDefaultObject:[framework autorelease]] retain];
|
||||
|
||||
data = [[associations_ objectForKey:data__Key
|
||||
withDefaultObject:[data autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"data=%@",data);
|
||||
action = [[associations_ objectForKey:action__Key
|
||||
withDefaultObject:[action autorelease]] retain];
|
||||
|
||||
mimeType = [[associations_ objectForKey:mimeType__Key
|
||||
withDefaultObject:[mimeType autorelease]] retain];
|
||||
|
||||
key = [[associations_ objectForKey:key__Key
|
||||
withDefaultObject:[key autorelease]] retain];
|
||||
|
||||
};
|
||||
ExceptionRaise(@"GSWActiveImage",@"you can't specify %@, %@ and %@",
|
||||
imageMapFileName__Key,
|
||||
imageMapString__Key,
|
||||
imageMapRegions__Key);
|
||||
};
|
||||
};
|
||||
_action = [[Xassociations objectForKey:action__Key
|
||||
withDefaultObject:[_action autorelease]] retain];
|
||||
|
||||
_href = [[Xassociations objectForKey:href__Key
|
||||
withDefaultObject:[_href autorelease]] retain];
|
||||
|
||||
_src = [[Xassociations objectForKey:src__Key
|
||||
withDefaultObject:[_src autorelease]] retain];
|
||||
|
||||
_xAssoc = [[Xassociations objectForKey:x__Key
|
||||
withDefaultObject:[_xAssoc autorelease]] retain];
|
||||
if (_xAssoc && ![_xAssoc isValueSettable])
|
||||
{
|
||||
ExceptionRaise0(@"GSWActiveImage",@"'x' parameter must be settable");
|
||||
};
|
||||
|
||||
_yAssoc = [[Xassociations objectForKey:y__Key
|
||||
withDefaultObject:[_yAssoc autorelease]] retain];
|
||||
if (_yAssoc && ![_yAssoc isValueSettable])
|
||||
{
|
||||
ExceptionRaise0(@"GSWActiveImage",@"'y' parameter must be settable");
|
||||
};
|
||||
|
||||
_target = [[Xassociations objectForKey:target__Key
|
||||
withDefaultObject:[_target autorelease]] retain];
|
||||
|
||||
_filename = [[Xassociations objectForKey:filename__Key
|
||||
withDefaultObject:[_filename autorelease]] retain];
|
||||
|
||||
_framework = [[Xassociations objectForKey:framework__Key
|
||||
withDefaultObject:[_framework autorelease]] retain];
|
||||
|
||||
_data = [[Xassociations objectForKey:data__Key
|
||||
withDefaultObject:[_data autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"_data=%@",_data);
|
||||
_action = [[Xassociations objectForKey:action__Key
|
||||
withDefaultObject:[_action autorelease]] retain];
|
||||
|
||||
_mimeType = [[Xassociations objectForKey:mimeType__Key
|
||||
withDefaultObject:[_mimeType autorelease]] retain];
|
||||
|
||||
_key = [[Xassociations objectForKey:key__Key
|
||||
withDefaultObject:[_key autorelease]] retain];
|
||||
|
||||
};
|
||||
return self;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
DESTROY(imageMapFileName);
|
||||
DESTROY(imageMapString);
|
||||
DESTROY(imageMapRegions);
|
||||
DESTROY(action);
|
||||
DESTROY(href);
|
||||
DESTROY(src);
|
||||
DESTROY(xAssoc);
|
||||
DESTROY(yAssoc);
|
||||
DESTROY(target);
|
||||
DESTROY(filename);
|
||||
DESTROY(framework);
|
||||
DESTROY(data);
|
||||
DESTROY(mimeType);
|
||||
DESTROY(key);
|
||||
DESTROY(_imageMapFileName);
|
||||
DESTROY(_imageMapString);
|
||||
DESTROY(_imageMapRegions);
|
||||
DESTROY(_action);
|
||||
DESTROY(_href);
|
||||
DESTROY(_src);
|
||||
DESTROY(_xAssoc);
|
||||
DESTROY(_yAssoc);
|
||||
DESTROY(_target);
|
||||
DESTROY(_filename);
|
||||
DESTROY(_framework);
|
||||
DESTROY(_data);
|
||||
DESTROY(_mimeType);
|
||||
DESTROY(_key);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -163,25 +171,25 @@ static char rcsId[] = "$Id$";
|
|||
-(NSString*)description
|
||||
{
|
||||
return [NSString stringWithFormat:@"<%s %p>",
|
||||
object_get_class_name(self),
|
||||
(void*)self];
|
||||
object_get_class_name(self),
|
||||
(void*)self];
|
||||
};
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWActiveImage (GSWActiveImageA)
|
||||
-(GSWAssociation*)hitTestX:(int)x_
|
||||
y:(int)y_
|
||||
inRegions:(NSArray*)regions_
|
||||
-(GSWAssociation*)hitTestX:(int)x
|
||||
y:(int)y
|
||||
inRegions:(NSArray*)regions
|
||||
{
|
||||
GSWAssociation* _assoc=nil;
|
||||
GSWGeometricRegion* _region=[GSWGeometricRegion hitTestX:x_
|
||||
y:y_
|
||||
inRegions:regions_];
|
||||
if (_region)
|
||||
_assoc=[GSWAssociation associationWithKeyPath:[_region userDefinedString]];
|
||||
GSWAssociation* assoc=nil;
|
||||
GSWGeometricRegion* region=[GSWGeometricRegion hitTestX:x
|
||||
y:y
|
||||
inRegions:regions];
|
||||
if (region)
|
||||
assoc=[GSWAssociation associationWithKeyPath:[region userDefinedString]];
|
||||
else
|
||||
_assoc=action;
|
||||
return _assoc;
|
||||
assoc=_action;
|
||||
return assoc;
|
||||
};
|
||||
@end
|
||||
|
||||
|
@ -190,8 +198,8 @@ static char rcsId[] = "$Id$";
|
|||
@implementation GSWActiveImage (GSWActiveImageB)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
//Does nothing
|
||||
|
@ -199,350 +207,350 @@ static char rcsId[] = "$Id$";
|
|||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
GSWElement* _element=nil;
|
||||
NSString* _senderID=nil;
|
||||
NSString* _elementID=nil;
|
||||
BOOL _disabledInContext=NO;
|
||||
BOOL _isInForm=NO;
|
||||
BOOL _XYValues=NO;
|
||||
BOOL _thisOne=NO;
|
||||
GSWComponent* _component=nil;
|
||||
int _x=0;
|
||||
int _y=0;
|
||||
GSWElement* element=nil;
|
||||
NSString* senderID=nil;
|
||||
NSString* elementID=nil;
|
||||
BOOL disabledInContext=NO;
|
||||
BOOL isInForm=NO;
|
||||
BOOL XYValues=NO;
|
||||
BOOL thisOne=NO;
|
||||
GSWComponent* component=nil;
|
||||
int x=0;
|
||||
int y=0;
|
||||
LOGObjectFnStart();
|
||||
_component=[context_ component];
|
||||
[context_ appendZeroElementIDComponent];
|
||||
_senderID=[context_ senderID];
|
||||
NSDebugMLog(@"_senderID=%@",_senderID);
|
||||
_elementID=[context_ elementID];
|
||||
NSDebugMLog(@"_elementID=%@",_elementID);
|
||||
if ([_elementID isEqualToString:_senderID])
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
[context_ deleteLastElementIDComponent];
|
||||
_disabledInContext=[self disabledInContext:context_];
|
||||
if (!_disabledInContext)
|
||||
{
|
||||
_isInForm=[context_ isInForm];
|
||||
if (_isInForm)
|
||||
{
|
||||
BOOL _wasFormSubmitted=[context_ _wasFormSubmitted];
|
||||
if (_wasFormSubmitted)
|
||||
{
|
||||
NSString* _nameInContext=[self nameInContext:context_];
|
||||
NSString* _formValueX=[request_ formValueForKey:[NSString stringWithFormat:@"%@.x",
|
||||
_nameInContext]];
|
||||
NSString* _formValueY=[request_ formValueForKey:[NSString stringWithFormat:@"%@.y",
|
||||
_nameInContext]];
|
||||
NSDebugMLLog(@"gswdync",@"_formValueX=%@",_formValueX);
|
||||
NSDebugMLLog(@"gswdync",@"_formValueY=%@",_formValueY);
|
||||
if (_formValueX && _formValueY)
|
||||
{
|
||||
_x=[_formValueX intValue];
|
||||
_y=[_formValueY intValue];
|
||||
_XYValues=YES;
|
||||
_thisOne=YES;
|
||||
}
|
||||
else
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
_elementID=[context_ elementID];
|
||||
NSDebugMLog(@"_elementID=%@",_elementID);
|
||||
if ([_elementID isEqualToString:_senderID])
|
||||
{
|
||||
id _param=[request_ formValueForKey:GSWKey_IsmapCoords[GSWebNamingConv]];
|
||||
NSDebugMLLog(@"gswdync",@"_param=%@",_param);
|
||||
if (_param)
|
||||
{
|
||||
if ([_param ismapCoordx:&_x
|
||||
y:&_y])
|
||||
_XYValues=YES;
|
||||
else
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
};
|
||||
_thisOne=YES;
|
||||
};
|
||||
};
|
||||
if (_thisOne)
|
||||
{
|
||||
GSWAssociation* _actionAssociation=nil;
|
||||
NSArray* _regions=nil;
|
||||
if (imageMapFileName)
|
||||
{
|
||||
id _imageMapFileNameValue=[imageMapFileName valueInComponent:_component];
|
||||
NSString* _imageMapFilePath=[[context_ component]
|
||||
pathForResourceNamed:_imageMapFileNameValue
|
||||
ofType:nil];
|
||||
if (!_imageMapFilePath)
|
||||
{
|
||||
GSWResourceManager* _resourceManager=[[GSWApplication application]resourceManager];
|
||||
NSArray* _languages=[context_ languages];
|
||||
_imageMapFilePath=[_resourceManager pathForResourceNamed:_imageMapFileNameValue
|
||||
inFramework:nil
|
||||
languages:_languages];
|
||||
component=[aContext component];
|
||||
[aContext appendZeroElementIDComponent];
|
||||
senderID=[aContext senderID];
|
||||
NSDebugMLog(@"senderID=%@",senderID);
|
||||
elementID=[aContext elementID];
|
||||
NSDebugMLog(@"elementID=%@",elementID);
|
||||
if ([elementID isEqualToString:senderID])
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
[aContext deleteLastElementIDComponent];
|
||||
disabledInContext=[self disabledInContext:aContext];
|
||||
if (!disabledInContext)
|
||||
{
|
||||
isInForm=[aContext isInForm];
|
||||
if (isInForm)
|
||||
{
|
||||
BOOL wasFormSubmitted=[aContext _wasFormSubmitted];
|
||||
if (wasFormSubmitted)
|
||||
{
|
||||
NSString* nameInContext=[self nameInContext:aContext];
|
||||
NSString* formValueX=[request formValueForKey:[NSString stringWithFormat:@"%@.x",
|
||||
nameInContext]];
|
||||
NSString* formValueY=[request formValueForKey:[NSString stringWithFormat:@"%@.y",
|
||||
nameInContext]];
|
||||
NSDebugMLLog(@"gswdync",@"formValueX=%@",formValueX);
|
||||
NSDebugMLLog(@"gswdync",@"formValueY=%@",formValueY);
|
||||
if (formValueX && formValueY)
|
||||
{
|
||||
x=[formValueX intValue];
|
||||
y=[formValueY intValue];
|
||||
XYValues=YES;
|
||||
thisOne=YES;
|
||||
}
|
||||
else
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
elementID=[aContext elementID];
|
||||
NSDebugMLog(@"elementID=%@",elementID);
|
||||
if ([elementID isEqualToString:senderID])
|
||||
{
|
||||
id param=[request formValueForKey:GSWKey_IsmapCoords[GSWebNamingConv]];
|
||||
NSDebugMLLog(@"gswdync",@"param=%@",param);
|
||||
if (param)
|
||||
{
|
||||
if ([param ismapCoordx:&x
|
||||
y:&y])
|
||||
XYValues=YES;
|
||||
else
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
};
|
||||
thisOne=YES;
|
||||
};
|
||||
};
|
||||
if (thisOne)
|
||||
{
|
||||
GSWAssociation* actionAssociation=nil;
|
||||
NSArray* regions=nil;
|
||||
if (_imageMapFileName)
|
||||
{
|
||||
id imageMapFileNameValue=[_imageMapFileName valueInComponent:component];
|
||||
NSString* imageMapFilePath=[[aContext component]
|
||||
pathForResourceNamed:imageMapFileNameValue
|
||||
ofType:nil];
|
||||
if (!imageMapFilePath)
|
||||
{
|
||||
GSWResourceManager* resourceManager=[[GSWApplication application]resourceManager];
|
||||
NSArray* languages=[aContext languages];
|
||||
imageMapFilePath=[resourceManager pathForResourceNamed:imageMapFileNameValue
|
||||
inFramework:nil
|
||||
languages:languages];
|
||||
|
||||
};
|
||||
if (_imageMapFilePath)
|
||||
_regions=[GSWGeometricRegion geometricRegionsWithFile:_imageMapFilePath];
|
||||
else
|
||||
{
|
||||
NSDebugMLLog0(@"gswdync",@"GSWActiveImage No image Map.");
|
||||
};
|
||||
}
|
||||
else if (!WOStrictFlag && imageMapString)
|
||||
{
|
||||
id _imageMapValue=[imageMapString valueInComponent:_component];
|
||||
_regions=[GSWGeometricRegion geometricRegionsWithString:_imageMapValue];
|
||||
}
|
||||
else if (!WOStrictFlag && imageMapRegions)
|
||||
{
|
||||
_regions=[imageMapRegions valueInComponent:_component];
|
||||
};
|
||||
if (xAssoc)
|
||||
[xAssoc setValue:[NSNumber numberWithInt:_x]
|
||||
inComponent:_component];
|
||||
if (yAssoc)
|
||||
[yAssoc setValue:[NSNumber numberWithInt:_y]
|
||||
inComponent:_component];
|
||||
};
|
||||
if (imageMapFilePath)
|
||||
regions=[GSWGeometricRegion geometricRegionsWithFile:imageMapFilePath];
|
||||
else
|
||||
{
|
||||
NSDebugMLLog0(@"gswdync",@"GSWActiveImage No image Map.");
|
||||
};
|
||||
}
|
||||
else if (!WOStrictFlag && _imageMapString)
|
||||
{
|
||||
id imageMapValue=[_imageMapString valueInComponent:component];
|
||||
regions=[GSWGeometricRegion geometricRegionsWithString:imageMapValue];
|
||||
}
|
||||
else if (!WOStrictFlag && _imageMapRegions)
|
||||
{
|
||||
regions=[_imageMapRegions valueInComponent:component];
|
||||
};
|
||||
if (_xAssoc)
|
||||
[_xAssoc setValue:[NSNumber numberWithInt:x]
|
||||
inComponent:component];
|
||||
if (_yAssoc)
|
||||
[_yAssoc setValue:[NSNumber numberWithInt:y]
|
||||
inComponent:component];
|
||||
|
||||
_actionAssociation=[self hitTestX:_x
|
||||
y:_y
|
||||
inRegions:_regions];
|
||||
if (_actionAssociation)
|
||||
{
|
||||
[context_ _setActionInvoked:YES];
|
||||
_element=[_actionAssociation valueInComponent:_component];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (href)
|
||||
{
|
||||
[context_ _setActionInvoked:YES];
|
||||
//TODO redirect to href
|
||||
}
|
||||
else if (action)
|
||||
{
|
||||
[context_ _setActionInvoked:YES];
|
||||
_element=[action valueInComponent:_component];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSDebugMLLog0(@"gswdync",@"GSWActiveImage Couldn't trigger action.");
|
||||
};
|
||||
};
|
||||
if (!_element)
|
||||
_element=[context_ page];
|
||||
}
|
||||
else
|
||||
_element=[super invokeActionForRequest:request_
|
||||
inContext:context_];
|
||||
}
|
||||
actionAssociation=[self hitTestX:x
|
||||
y:y
|
||||
inRegions:regions];
|
||||
if (actionAssociation)
|
||||
{
|
||||
[aContext _setActionInvoked:YES];
|
||||
element=[actionAssociation valueInComponent:component];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_href)
|
||||
{
|
||||
[aContext _setActionInvoked:YES];
|
||||
//TODO redirect to href
|
||||
}
|
||||
else if (_action)
|
||||
{
|
||||
[aContext _setActionInvoked:YES];
|
||||
element=[_action valueInComponent:component];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSDebugMLLog0(@"gswdync",@"GSWActiveImage Couldn't trigger action.");
|
||||
};
|
||||
};
|
||||
if (!element)
|
||||
element=[aContext page];
|
||||
}
|
||||
else
|
||||
element=[super invokeActionForRequest:request
|
||||
inContext:aContext];
|
||||
}
|
||||
else
|
||||
_element=[super invokeActionForRequest:request_
|
||||
inContext:context_];
|
||||
element=[super invokeActionForRequest:request
|
||||
inContext:aContext];
|
||||
LOGObjectFnStop();
|
||||
return _element;
|
||||
return element;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
//OK
|
||||
GSWRequest* _request=[context_ request];
|
||||
BOOL _isFromClientComponent=[_request isFromClientComponent];
|
||||
BOOL _disabledInContext=[self disabledInContext:context_];
|
||||
BOOL _isInForm=NO;
|
||||
_isInForm=[context_ isInForm]; //TODO
|
||||
if (_isInForm)
|
||||
{
|
||||
if (!_disabledInContext)
|
||||
[response_ _appendContentAsciiString:@"<INPUT "];
|
||||
else
|
||||
[response_ _appendContentAsciiString:@"<IMG "];
|
||||
}
|
||||
GSWRequest* _request=[aContext request];
|
||||
BOOL isFromClientComponent=[_request isFromClientComponent];
|
||||
BOOL disabledInContext=[self disabledInContext:aContext];
|
||||
BOOL isInForm=NO;
|
||||
isInForm=[aContext isInForm]; //TODO
|
||||
if (isInForm)
|
||||
{
|
||||
if (!disabledInContext)
|
||||
[response _appendContentAsciiString:@"<INPUT "];
|
||||
else
|
||||
[response _appendContentAsciiString:@"<IMG "];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!_disabledInContext)
|
||||
{
|
||||
NSString* _href=nil;
|
||||
[response_ _appendContentAsciiString:@"<A HREF=\""];
|
||||
if (href)
|
||||
_href=[self hrefInContext:context_];
|
||||
else
|
||||
_href=(NSString*)[context_ componentActionURL];
|
||||
[response_ appendContentString:_href];
|
||||
[response_ _appendContentAsciiString:@"\">"];
|
||||
};
|
||||
[response_ _appendContentAsciiString:@"<IMG"];
|
||||
};
|
||||
[super appendToResponse:response_
|
||||
inContext:context_];
|
||||
if (!_isInForm)
|
||||
{
|
||||
if (!_disabledInContext)
|
||||
{
|
||||
[response_ _appendContentAsciiString:@"</A>"];
|
||||
};
|
||||
};
|
||||
{
|
||||
if (!disabledInContext)
|
||||
{
|
||||
NSString* hrefValue=nil;
|
||||
[response _appendContentAsciiString:@"<A HREF=\""];
|
||||
if (_href)
|
||||
hrefValue=[self hrefInContext:aContext];
|
||||
else
|
||||
hrefValue=(NSString*)[aContext componentActionURL];
|
||||
[response appendContentString:hrefValue];
|
||||
[response _appendContentAsciiString:@"\">"];
|
||||
};
|
||||
[response _appendContentAsciiString:@"<IMG"];
|
||||
};
|
||||
[super appendToResponse:response
|
||||
inContext:aContext];
|
||||
if (!isInForm)
|
||||
{
|
||||
if (!disabledInContext)
|
||||
{
|
||||
[response _appendContentAsciiString:@"</A>"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)frameworkNameInContext:(GSWContext*)context_
|
||||
-(NSString*)frameworkNameInContext:(GSWContext*)aContext
|
||||
{
|
||||
//OK
|
||||
NSString* _frameworkName=nil;
|
||||
GSWComponent* _component=[context_ component];
|
||||
NSDebugMLog(@"framework=%@",framework);
|
||||
if (framework)
|
||||
_frameworkName=[framework valueInComponent:_component];
|
||||
NSString* frameworkName=nil;
|
||||
GSWComponent* component=[aContext component];
|
||||
NSDebugMLog(@"_framework=%@",_framework);
|
||||
if (_framework)
|
||||
frameworkName=[_framework valueInComponent:component];
|
||||
else
|
||||
_frameworkName=[_component frameworkName];
|
||||
return _frameworkName;
|
||||
frameworkName=[component frameworkName];
|
||||
return frameworkName;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
//NDFN
|
||||
-(NSString*)imageSourceInContext:(GSWContext*)context_
|
||||
-(NSString*)imageSourceInContext:(GSWContext*)aContext
|
||||
{
|
||||
GSWComponent* _component=nil;
|
||||
NSString* _imageSource=nil;
|
||||
_component=[context_ component];
|
||||
_imageSource=[src valueInComponent:_component];
|
||||
return _imageSource;
|
||||
GSWComponent* component=nil;
|
||||
NSString* imageSource=nil;
|
||||
component=[aContext component];
|
||||
imageSource=[_src valueInComponent:component];
|
||||
return imageSource;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
//NDFN
|
||||
-(NSString*)hrefInContext:(GSWContext*)context_
|
||||
-(NSString*)hrefInContext:(GSWContext*)aContext
|
||||
{
|
||||
GSWComponent* _component=nil;
|
||||
NSString* _href=nil;
|
||||
_component=[context_ component];
|
||||
_href=[href valueInComponent:_component];
|
||||
return _href;
|
||||
GSWComponent* component=nil;
|
||||
NSString* hrefValue=nil;
|
||||
component=[aContext component];
|
||||
hrefValue=[_href valueInComponent:component];
|
||||
return hrefValue;
|
||||
};
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWActiveImage (GSWActiveImageC)
|
||||
-(void)appendGSWebObjectsAssociationsToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)appendGSWebObjectsAssociationsToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
//OK
|
||||
NSString* _url=nil;
|
||||
GSWComponent* _component=nil;
|
||||
id _data=nil;
|
||||
id _mimeTypeValue=nil;
|
||||
GSWURLValuedElementData* _dataValue=nil;
|
||||
GSWResourceManager* _resourceManager=nil;
|
||||
BOOL _disabledInContext=NO;
|
||||
BOOL _isInForm=NO;
|
||||
NSString* url=nil;
|
||||
GSWComponent* component=nil;
|
||||
id data=nil;
|
||||
id mimeTypeValue=nil;
|
||||
GSWURLValuedElementData* dataValue=nil;
|
||||
GSWResourceManager* resourceManager=nil;
|
||||
BOOL disabledInContext=NO;
|
||||
BOOL isInForm=NO;
|
||||
LOGObjectFnStartC("GSWActiveImage");
|
||||
NSDebugMLLog(@"gswdync",@"_elementID=%@",[context_ elementID]);
|
||||
_component=[context_ component];
|
||||
_disabledInContext=[self disabledInContext:context_];
|
||||
_isInForm=[context_ isInForm];
|
||||
NSDebugMLLog(@"gswdync",@"elementID=%@",[aContext elementID]);
|
||||
component=[aContext component];
|
||||
disabledInContext=[self disabledInContext:aContext];
|
||||
isInForm=[aContext isInForm];
|
||||
|
||||
if (!_disabledInContext)
|
||||
if (!disabledInContext)
|
||||
{
|
||||
if (_isInForm)
|
||||
if (isInForm)
|
||||
{
|
||||
NSString* _nameInContext=[self nameInContext:context_];
|
||||
[response_ _appendContentAsciiString:@" type=image"];
|
||||
[response_ _appendContentAsciiString:@" name=\""];
|
||||
[response_ appendContentHTMLAttributeValue:_nameInContext];
|
||||
[response_ appendContentCharacter:'"'];
|
||||
NSString* nameInContext=[self nameInContext:aContext];
|
||||
[response _appendContentAsciiString:@" type=image"];
|
||||
[response _appendContentAsciiString:@" name=\""];
|
||||
[response appendContentHTMLAttributeValue:nameInContext];
|
||||
[response appendContentCharacter:'"'];
|
||||
}
|
||||
else
|
||||
{
|
||||
[response_ _appendContentAsciiString:@" ismap"];
|
||||
[response _appendContentAsciiString:@" ismap"];
|
||||
};
|
||||
}
|
||||
|
||||
NSDebugMLLog(@"gswdync",@"data=%@",data);
|
||||
NSDebugMLLog(@"gswdync",@"filename=%@",filename);
|
||||
if (key)
|
||||
{
|
||||
NSString* _keyValue=[key valueInComponent:_component];
|
||||
_dataValue=[_resourceManager _cachedDataForKey:_keyValue];
|
||||
};
|
||||
if (!_dataValue && data)
|
||||
{
|
||||
_data=[data valueInComponent:_component];
|
||||
NSDebugMLLog(@"gswdync",@"_data=%@",_data);
|
||||
_mimeTypeValue=[mimeType valueInComponent:_component];
|
||||
NSDebugMLLog(@"gswdync",@"mimeType=%@",mimeType);
|
||||
NSDebugMLLog(@"gswdync",@"_mimeTypeValue=%@",_mimeTypeValue);
|
||||
_dataValue=[[[GSWURLValuedElementData alloc] initWithData:_data
|
||||
mimeType:_mimeTypeValue
|
||||
key:nil] autorelease];
|
||||
NSDebugMLLog(@"gswdync",@"_dataValue=%@",_dataValue);
|
||||
};
|
||||
_resourceManager=[[GSWApplication application]resourceManager];
|
||||
if (key || data)
|
||||
{
|
||||
[_resourceManager setURLValuedElementData:_dataValue];
|
||||
}
|
||||
else if (filename)
|
||||
{
|
||||
id _filenameValue=nil;
|
||||
id _frameworkValue=nil;
|
||||
GSWRequest* _request=nil;
|
||||
NSArray* _languages=nil;
|
||||
NSDebugMLLog(@"gswdync",@"filename=%@",filename);
|
||||
_filenameValue=[filename valueInComponent:_component];
|
||||
NSDebugMLLog(@"gswdync",@"_filenameValue=%@",_filenameValue);
|
||||
_frameworkValue=[self frameworkNameInContext:context_];
|
||||
NSDebugMLLog(@"gswdync",@"_frameworkValue=%@",_frameworkValue);
|
||||
_request=[context_ request];
|
||||
_languages=[context_ languages];
|
||||
_url=[_resourceManager urlForResourceNamed:_filenameValue
|
||||
inFramework:_frameworkValue
|
||||
languages:_languages
|
||||
request:_request];
|
||||
if (!_url)
|
||||
{
|
||||
LOGSeriousError(@"No URL for resource named: %@ in framework named: %@ for languages: %@",
|
||||
_filenameValue,
|
||||
_frameworkValue,
|
||||
_languages);
|
||||
};
|
||||
};
|
||||
[response_ _appendContentAsciiString:@" src=\""];
|
||||
if (key || data)
|
||||
{
|
||||
[_dataValue appendDataURLToResponse:response_
|
||||
inContext:context_];
|
||||
}
|
||||
else if (filename)
|
||||
{
|
||||
[response_ appendContentString:_url];
|
||||
}
|
||||
else if (src)
|
||||
{
|
||||
NSString* _src=[self imageSourceInContext:context_];
|
||||
[response_ appendContentString:_src];
|
||||
}
|
||||
NSDebugMLLog(@"gswdync",@"_data=%@",_data);
|
||||
NSDebugMLLog(@"gswdync",@"_filename=%@",_filename);
|
||||
if (_key)
|
||||
{
|
||||
NSString* keyValue=[_key valueInComponent:component];
|
||||
dataValue=[resourceManager _cachedDataForKey:keyValue];
|
||||
};
|
||||
if (!dataValue && _data)
|
||||
{
|
||||
data=[_data valueInComponent:component];
|
||||
NSDebugMLLog(@"gswdync",@"data=%@",data);
|
||||
mimeTypeValue=[_mimeType valueInComponent:component];
|
||||
NSDebugMLLog(@"gswdync",@"_mimeType=%@",_mimeType);
|
||||
NSDebugMLLog(@"gswdync",@"mimeTypeValue=%@",mimeTypeValue);
|
||||
dataValue=[[[GSWURLValuedElementData alloc] initWithData:data
|
||||
mimeType:mimeTypeValue
|
||||
key:nil] autorelease];
|
||||
NSDebugMLLog(@"gswdync",@"dataValue=%@",dataValue);
|
||||
};
|
||||
resourceManager=[[GSWApplication application]resourceManager];
|
||||
if (_key || _data)
|
||||
{
|
||||
[resourceManager setURLValuedElementData:dataValue];
|
||||
}
|
||||
else if (_filename)
|
||||
{
|
||||
id filenameValue=nil;
|
||||
id frameworkValue=nil;
|
||||
GSWRequest* aRequest=nil;
|
||||
NSArray* languages=nil;
|
||||
NSDebugMLLog(@"gswdync",@"_filename=%@",_filename);
|
||||
filenameValue=[_filename valueInComponent:component];
|
||||
NSDebugMLLog(@"gswdync",@"filenameValue=%@",filenameValue);
|
||||
frameworkValue=[self frameworkNameInContext:aContext];
|
||||
NSDebugMLLog(@"gswdync",@"frameworkValue=%@",frameworkValue);
|
||||
aRequest=[aContext request];
|
||||
languages=[aContext languages];
|
||||
url=[resourceManager urlForResourceNamed:filenameValue
|
||||
inFramework:frameworkValue
|
||||
languages:languages
|
||||
request:aRequest];
|
||||
if (!url)
|
||||
{
|
||||
LOGSeriousError(@"No URL for resource named: %@ in framework named: %@ for languages: %@",
|
||||
filenameValue,
|
||||
frameworkValue,
|
||||
languages);
|
||||
};
|
||||
};
|
||||
[response _appendContentAsciiString:@" src=\""];
|
||||
if (_key || _data)
|
||||
{
|
||||
[dataValue appendDataURLToResponse:response
|
||||
inContext:aContext];
|
||||
}
|
||||
else if (_filename)
|
||||
{
|
||||
[response appendContentString:url];
|
||||
}
|
||||
else if (_src)
|
||||
{
|
||||
NSString* srcValue=[self imageSourceInContext:aContext];
|
||||
[response appendContentString:srcValue];
|
||||
}
|
||||
else
|
||||
{
|
||||
GSWDynamicURLString* _componentActionURL=[context_ componentActionURL];
|
||||
NSDebugMLLog(@"gswdync",@"_componentActionURL=%@",_componentActionURL);
|
||||
[response_ appendContentString:(NSString*)_componentActionURL];
|
||||
};
|
||||
[response_ appendContentCharacter:'"'];
|
||||
NSDebugMLLog(@"gswdync",@"_elementID=%@",[context_ elementID]);
|
||||
{
|
||||
GSWDynamicURLString* componentActionURL=[aContext componentActionURL];
|
||||
NSDebugMLLog(@"gswdync",@"componentActionURL=%@",componentActionURL);
|
||||
[response appendContentString:(NSString*)componentActionURL];
|
||||
};
|
||||
[response appendContentCharacter:'"'];
|
||||
NSDebugMLLog(@"gswdync",@"elementID=%@",[aContext elementID]);
|
||||
LOGObjectFnStopC("GSWActiveImage");
|
||||
};
|
||||
|
||||
|
@ -554,16 +562,16 @@ static char rcsId[] = "$Id$";
|
|||
@implementation GSWActiveImage (GSWActiveImageD)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(BOOL)appendStringAtRight:(id)_unkwnon
|
||||
withMapping:(char*)_mapping
|
||||
-(BOOL)appendStringAtRight:(id)unkwnon
|
||||
withMapping:(char*)mapping
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return NO;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(BOOL)appendStringAtLeft:(id)_unkwnon
|
||||
withMapping:(char*)_mapping
|
||||
-(BOOL)appendStringAtLeft:(id)unkwnon
|
||||
withMapping:(char*)mapping
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return NO;
|
||||
|
|
|
@ -902,25 +902,40 @@ static NSMutableArray* associationsLogsHandlerClasses=nil;
|
|||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
-(void)associationsSetValuesFromObject:(id)from_
|
||||
inObject:(id)to_
|
||||
-(void)associationsSetValuesFromObject:(id)from
|
||||
inObject:(id)to
|
||||
{
|
||||
NSEnumerator *enumerator = nil;
|
||||
id _key=nil;
|
||||
id _varValue=nil;
|
||||
id _var=nil;
|
||||
id key=nil;
|
||||
id varValue=nil;
|
||||
id var=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"associations",@"from=%@",from);
|
||||
NSDebugMLLog(@"associations",@"to=%@",to);
|
||||
enumerator = [self keyEnumerator];
|
||||
while ((_key = [enumerator nextObject]))
|
||||
{
|
||||
NSDebugMLLog(@"associations",@"_key=%@",_key);
|
||||
_var=[self objectForKey:_key];
|
||||
NSDebugMLLog(@"associations",@"_var=%@",_var);
|
||||
_varValue=[_var valueInComponent:from_];
|
||||
NSDebugMLLog(@"associations",@"_varValue=%@",_varValue);
|
||||
[_key setValue:_varValue
|
||||
inComponent:to_];
|
||||
};
|
||||
while ((key = [enumerator nextObject]))
|
||||
{
|
||||
NSDebugMLLog(@"associations",@"key=%@",key);
|
||||
/* NSAssert2([key isKindOfClass:[GSWAssociation class]],
|
||||
@"key is not an GSWAssociation but a %@: %@",
|
||||
[key class],
|
||||
key);*/
|
||||
var=[self objectForKey:key];
|
||||
NSDebugMLLog(@"associations",@"var=%@",var);
|
||||
/* NSAssert2([var isKindOfClass:[GSWAssociation class]],
|
||||
@"Variable is not an GSWAssociation but a %@: %@",
|
||||
[var class],
|
||||
var);*/
|
||||
if ([var isKindOfClass:[GSWAssociation class]])
|
||||
varValue=[var valueInComponent:from];
|
||||
else
|
||||
varValue=var;
|
||||
NSDebugMLLog(@"associations",@"varValue=%@",varValue);
|
||||
if (![key isKindOfClass:[GSWAssociation class]])
|
||||
key=[GSWAssociation associationWithKeyPath:key];
|
||||
[key setValue:varValue
|
||||
inComponent:to];
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
|
@ -935,7 +950,7 @@ static NSMutableArray* associationsLogsHandlerClasses=nil;
|
|||
id _varKeyAssociation=nil;
|
||||
id _value=nil;
|
||||
LOGObjectFnStart();
|
||||
_newAssociation=[NSMutableDictionary dictionary];
|
||||
_newAssociation=(NSMutableDictionary*)[NSMutableDictionary dictionary];
|
||||
enumerator = [self keyEnumerator];
|
||||
while ((_key = [enumerator nextObject]))
|
||||
{
|
||||
|
|
|
@ -348,8 +348,8 @@ associationsKeys:(NSArray*)_associationsKeys
|
|||
NSDebugMLLog(@"gswcomponents",@"name=%@ parent=%p (%@)",
|
||||
[self definitionName],
|
||||
(void*)parent,[parent class]);
|
||||
ASSIGN(associations,_associations);
|
||||
NSDebugMLLog(@"gswcomponents",@"associations=%@",associations);
|
||||
ASSIGN(associations,_associations);
|
||||
ASSIGN(associationsKeys,_associationsKeys);
|
||||
NSDebugMLLog(@"gswcomponents",@"associationsKeys=%@",associationsKeys);
|
||||
ASSIGN(childTemplate,_template);
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWComponentContent.h - GSWeb: Class GSWComponentContent
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWComponentContent.h - <title>GSWeb: Class GSWComponentContent</title>
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
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
|
||||
|
@ -19,21 +25,21 @@
|
|||
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.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
// $Id$
|
||||
|
||||
#ifndef _GSWComponentContent_h__
|
||||
#define _GSWComponentContent_h__
|
||||
|
||||
|
||||
@interface GSWComponentContent : GSWDynamicElement
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)aContext;
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_;
|
||||
inContext:(GSWContext*)aContext;
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_;
|
||||
inContext:(GSWContext*)aContext;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWComponentContent.m - GSWeb: Class GSWComponentContent
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWComponentContent.m - <title>GSWeb: Class GSWComponentContent</title>
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
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
|
||||
|
@ -19,7 +25,8 @@
|
|||
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.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
static char rcsId[] = "$Id$";
|
||||
|
||||
|
@ -29,87 +36,96 @@ static char rcsId[] = "$Id$";
|
|||
@implementation GSWComponentContent
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
//OK
|
||||
GSWComponent* _component=nil;
|
||||
GSWComponent* _parent=nil;
|
||||
GSWElement* _childTemplate=nil;
|
||||
GSWComponent* component=nil;
|
||||
GSWComponent* parent=nil;
|
||||
GSWElement* childTemplate=nil;
|
||||
#ifndef NDEBBUG
|
||||
int elementsNb=[(GSWElementIDString*)[context_ elementID]elementsNb];
|
||||
int elementsNb=[(GSWElementIDString*)[aContext elementID]elementsNb];
|
||||
#endif
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
_component=[context_ component];
|
||||
_childTemplate=[_component _childTemplate];
|
||||
_parent=[_component parent];
|
||||
[context_ _setCurrentComponent:_parent];
|
||||
[_childTemplate appendToResponse:response_
|
||||
inContext:context_];
|
||||
[context_ _setCurrentComponent:_component];
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ defName=%@ id=%@",
|
||||
[self class],[self definitionName],[aContext elementID]);
|
||||
component=[aContext component];
|
||||
childTemplate=[component _childTemplate];
|
||||
parent=[component parent];
|
||||
[aContext _setCurrentComponent:parent];
|
||||
[childTemplate appendToResponse:response
|
||||
inContext:aContext];
|
||||
[aContext _setCurrentComponent:component];
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ defName=%@ id=%@",
|
||||
[self class],[self definitionName],[aContext elementID]);
|
||||
#ifndef NDEBBUG
|
||||
NSAssert(elementsNb==[(GSWElementIDString*)[context_ elementID]elementsNb],@"GSWComponentContent appendToResponse: bad elementID");
|
||||
NSAssert(elementsNb==[(GSWElementIDString*)[aContext elementID]elementsNb],
|
||||
@"GSWComponentContent appendToResponse: bad elementID");
|
||||
#endif
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
//OK
|
||||
GSWElement* _element=nil;
|
||||
GSWComponent* _component=nil;
|
||||
GSWComponent* _parent=nil;
|
||||
GSWElement* _childTemplate=nil;
|
||||
GSWElement* element=nil;
|
||||
GSWComponent* component=nil;
|
||||
GSWComponent* parent=nil;
|
||||
GSWElement* childTemplate=nil;
|
||||
#ifndef NDEBBUG
|
||||
int elementsNb=[(GSWElementIDString*)[context_ elementID]elementsNb];
|
||||
int elementsNb=[(GSWElementIDString*)[aContext elementID]elementsNb];
|
||||
#endif
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
_component=[context_ component];
|
||||
NSDebugMLLog(@"gswdync",@"_component=%@",_component);
|
||||
_childTemplate=[_component _childTemplate];
|
||||
NSDebugMLLog(@"gswdync",@"_childTemplate=%@",_childTemplate);
|
||||
_parent=[_component parent];
|
||||
NSDebugMLLog(@"gswdync",@"_parent=%@",_parent);
|
||||
[context_ _setCurrentComponent:_parent];
|
||||
_element=[_childTemplate invokeActionForRequest:request_
|
||||
inContext:context_];
|
||||
[context_ _setCurrentComponent:_component];
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ defName=%@ id=%@",
|
||||
[self class],[self definitionName],[aContext elementID]);
|
||||
component=[aContext component];
|
||||
NSDebugMLLog(@"gswdync",@"component=%@",component);
|
||||
childTemplate=[component _childTemplate];
|
||||
NSDebugMLLog(@"gswdync",@"childTemplate=%@",childTemplate);
|
||||
parent=[component parent];
|
||||
NSDebugMLLog(@"gswdync",@"parent=%@",parent);
|
||||
[aContext _setCurrentComponent:parent];
|
||||
element=[childTemplate invokeActionForRequest:request
|
||||
inContext:aContext];
|
||||
[aContext _setCurrentComponent:component];
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ defName=%@ id=%@",
|
||||
[self class],[self definitionName],[aContext elementID]);
|
||||
#ifndef NDEBBUG
|
||||
NSAssert(elementsNb==[(GSWElementIDString*)[context_ elementID]elementsNb],@"GSWComponentContent invokeActionForRequest: bad elementID");
|
||||
NSAssert(elementsNb==[(GSWElementIDString*)[aContext elementID]elementsNb],
|
||||
@"GSWComponentContent invokeActionForRequest: bad elementID");
|
||||
#endif
|
||||
LOGObjectFnStop();
|
||||
return _element;
|
||||
return element;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
//OK
|
||||
GSWComponent* _component=nil;
|
||||
GSWComponent* _parent=nil;
|
||||
GSWElement* _childTemplate=nil;
|
||||
GSWComponent* component=nil;
|
||||
GSWComponent* parent=nil;
|
||||
GSWElement* childTemplate=nil;
|
||||
#ifndef NDEBBUG
|
||||
int elementsNb=[(GSWElementIDString*)[context_ elementID]elementsNb];
|
||||
int elementsNb=[(GSWElementIDString*)[aContext elementID]elementsNb];
|
||||
#endif
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
_component=[context_ component];
|
||||
_childTemplate=[_component _childTemplate];
|
||||
_parent=[_component parent];
|
||||
[context_ _setCurrentComponent:_parent];
|
||||
[_childTemplate takeValuesFromRequest:request_
|
||||
inContext:context_];
|
||||
[context_ _setCurrentComponent:_component];
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ defName=%@ id=%@",
|
||||
[self class],[self definitionName],[aContext elementID]);
|
||||
component=[aContext component];
|
||||
childTemplate=[component _childTemplate];
|
||||
parent=[component parent];
|
||||
[aContext _setCurrentComponent:parent];
|
||||
[childTemplate takeValuesFromRequest:request
|
||||
inContext:aContext];
|
||||
[aContext _setCurrentComponent:component];
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ defName=%@ id=%@",
|
||||
[self class],[self definitionName],[aContext elementID]);
|
||||
#ifndef NDEBBUG
|
||||
NSAssert(elementsNb==[(GSWElementIDString*)[context_ elementID]elementsNb],@"GSWComponentContent takeValuesFromRequest: bad elementID");
|
||||
NSAssert(elementsNb==[(GSWElementIDString*)[aContext elementID]elementsNb],
|
||||
@"GSWComponentContent takeValuesFromRequest: bad elementID");
|
||||
#endif
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
|
|
@ -30,29 +30,29 @@ static char rcsId[] = "$Id$";
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithName:(NSString*)name_
|
||||
associations:(NSDictionary*)associations_
|
||||
associations:(NSDictionary*)associations_
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
//OK
|
||||
NSDebugMLLog(@"gswdync",@"name:%@",name);
|
||||
NSDebugMLLog(@"gswdync",@"associations_:%@",associations_);
|
||||
if ((self==[super initWithName:name_
|
||||
associations:associations_
|
||||
template:nil]))
|
||||
{
|
||||
ASSIGN(name,name_);
|
||||
if (associations_ && [associations_ count])
|
||||
{
|
||||
NSMutableArray* tmpArray=[NSMutableArray array];
|
||||
int i=0;
|
||||
ASSIGN(associationsKeys,[associations_ allKeys]);
|
||||
for(i=0;i<[associationsKeys count];i++)
|
||||
{
|
||||
[tmpArray addObject:[associations_ objectForKey:[associationsKeys objectAtIndex:i]]];
|
||||
};
|
||||
ASSIGN(associations,[NSArray arrayWithArray:tmpArray]);
|
||||
};
|
||||
};
|
||||
associations:associations_
|
||||
template:nil]))
|
||||
{
|
||||
ASSIGN(name,name_);
|
||||
if (associations_ && [associations_ count])
|
||||
{
|
||||
NSMutableArray* tmpArray=[NSMutableArray array];
|
||||
int i=0;
|
||||
ASSIGN(associationsKeys,[associations_ allKeys]);
|
||||
for(i=0;i<[associationsKeys count];i++)
|
||||
{
|
||||
[tmpArray addObject:[associations_ objectForKey:[associationsKeys objectAtIndex:i]]];
|
||||
};
|
||||
ASSIGN(associations,[NSArray arrayWithArray:tmpArray]);
|
||||
};
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
return self;
|
||||
};
|
||||
|
|
|
@ -42,8 +42,12 @@ static char rcsId[] = "$Id$";
|
|||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
GSWLogMemC("GSWConstantValueAssociation start of dealloc");
|
||||
GSWLogAssertGood(self);
|
||||
DESTROY(value);
|
||||
GSWLogMemC("value deallocated");
|
||||
[super dealloc];
|
||||
GSWLogMemC("GSWConstantValueAssociation end of dealloc");
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
|
@ -268,6 +268,7 @@ extern id identifier__Key;
|
|||
extern id count__Key;
|
||||
extern id escapeHTML__Key;
|
||||
extern id GSWComponentName__Key[2];
|
||||
extern id componentName__Key;
|
||||
extern id prefix__Key;
|
||||
extern id suffix__Key;
|
||||
extern id level__Key;
|
||||
|
|
|
@ -273,6 +273,7 @@ id identifier__Key = @"identifier";
|
|||
id count__Key = @"count";
|
||||
id escapeHTML__Key = @"escapeHTML";
|
||||
id GSWComponentName__Key[2] = { @"GSWComponentName", @"WOComponentName"};
|
||||
id componentName__Key = @"componentName";
|
||||
id prefix__Key = @"prefix";
|
||||
id suffix__Key = @"suffix";
|
||||
id level__Key = @"level";
|
||||
|
|
|
@ -42,8 +42,12 @@ static char rcsId[] = "$Id$";
|
|||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
GSWLogMemC("GSWKeyValueAssociation start of dealloc");
|
||||
GSWLogAssertGood(self);
|
||||
DESTROY(keyPath);
|
||||
GSWLogMemC("keyPath deallocated");
|
||||
[super dealloc];
|
||||
GSWLogMemC("GSWKeyValueAssociation end of dealloc");
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -82,9 +86,11 @@ static char rcsId[] = "$Id$";
|
|||
if (value_) {
|
||||
NSDebugMLLog(@"associations",@"value_ class:%@",NSStringFromClass([value_ class]));
|
||||
}
|
||||
/*Not Here because self is not a string key !
|
||||
//TODO (return something!)
|
||||
[object_ validateValue:&value_
|
||||
forKey:self];
|
||||
*/
|
||||
[GSWAssociation setValue:value_
|
||||
inObject:object_
|
||||
forKeyPath:keyPath];
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWSwitchComponent.h - GSWeb: Class GSWSwitchComponent
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWSwitchComponent.h - <title>GSWeb: Class GSWSwitchComponent</title>
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
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
|
||||
|
@ -19,7 +25,8 @@
|
|||
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.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
// $Id$
|
||||
|
||||
|
@ -29,32 +36,32 @@
|
|||
//====================================================================
|
||||
@interface GSWSwitchComponent: GSWDynamicElement
|
||||
{
|
||||
GSWAssociation* componentName;
|
||||
NSDictionary* componentAttributes;
|
||||
GSWElement* template;
|
||||
NSMutableDictionary* componentCache;
|
||||
GSWAssociation* _componentName;
|
||||
NSDictionary* _componentAttributes;
|
||||
GSWElement* _template;
|
||||
NSMutableDictionary* _componentCache;
|
||||
};
|
||||
|
||||
-(void)dealloc;
|
||||
-(id)initWithName:(NSString*)name_
|
||||
associations:(NSDictionary*)associations_
|
||||
template:(GSWElement*)templateElement_;
|
||||
-(id)initWithName:(NSString*)name
|
||||
associations:(NSDictionary*)associations
|
||||
template:(GSWElement*)templateElement;
|
||||
-(NSString*)description;
|
||||
|
||||
@end
|
||||
|
||||
@interface GSWSwitchComponent (GSWSwitchComponentA)
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)aContext;
|
||||
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)aContext;
|
||||
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(GSWElement*)_realComponentWithName:(NSString*)name_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(NSString*)_elementNameInContext:(GSWContext*)context_;
|
||||
inContext:(GSWContext*)aContext;
|
||||
-(GSWElement*)_realComponentWithName:(NSString*)name
|
||||
inContext:(GSWContext*)aContext;
|
||||
-(NSString*)_elementNameInContext:(GSWContext*)aContext;
|
||||
@end
|
||||
|
||||
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
/* GSWSwitchComponent.m - GSWeb: Class GSWSwitchComponent
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWSwitchComponent.m - <title>GSWeb: Class GSWSwitchComponent</title>
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@sbuilders.com>
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
<abstract></abstract>
|
||||
|
||||
This file is part of the GNUstep Web Library.
|
||||
|
||||
<license>
|
||||
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
|
||||
|
@ -19,7 +25,8 @@
|
|||
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.
|
||||
*/
|
||||
</license>
|
||||
**/
|
||||
|
||||
static char rcsId[] = "$Id$";
|
||||
|
||||
|
@ -29,31 +36,46 @@ static char rcsId[] = "$Id$";
|
|||
@implementation GSWSwitchComponent
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithName:(NSString*)name_
|
||||
associations:(NSDictionary*)associations_
|
||||
template:(GSWElement*)templateElement_
|
||||
-(id)initWithName:(NSString*)aName
|
||||
associations:(NSDictionary*)associations
|
||||
template:(GSWElement*)templateElement
|
||||
{
|
||||
LOGObjectFnStartC("GSWSwitchComponent");
|
||||
if ((self=[super initWithName:name_
|
||||
associations:associations_
|
||||
if ((self=[super initWithName:aName
|
||||
associations:associations
|
||||
template:nil]))
|
||||
{
|
||||
NSMutableDictionary* _associations=[NSMutableDictionary dictionaryWithDictionary:associations_];
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent: _associations=%@",_associations);
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent: GSWComponentName__Key=%@",GSWComponentName__Key[GSWebNamingConv]);
|
||||
[_associations removeObjectForKey:GSWComponentName__Key[GSWebNamingConv]];
|
||||
NSMutableDictionary* tmpAssociations=[NSMutableDictionary dictionaryWithDictionary:associations];
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent %p (defName=%@): tmpAssociations=%@",
|
||||
self,[self definitionName],tmpAssociations);
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent %p (defName=%@): GSWComponentName__Key=%@",
|
||||
self,[self definitionName],GSWComponentName__Key[GSWebNamingConv]);
|
||||
[tmpAssociations removeObjectForKey:GSWComponentName__Key[GSWebNamingConv]];
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent %p (defName=%@): componentName__Key=%@",
|
||||
self,[self definitionName],componentName__Key);
|
||||
[tmpAssociations removeObjectForKey:componentName__Key];
|
||||
|
||||
componentName = [[associations_ objectForKey:GSWComponentName__Key[GSWebNamingConv]
|
||||
withDefaultObject:[componentName autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent: componentName=%@",componentName);
|
||||
_componentName = [[associations objectForKey:GSWComponentName__Key[GSWebNamingConv]
|
||||
withDefaultObject:[_componentName autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent %p (defName=%@): componentName=%@",
|
||||
self,[self definitionName],_componentName);
|
||||
if (!_componentName)
|
||||
{
|
||||
_componentName = [[associations objectForKey:componentName__Key
|
||||
withDefaultObject:[_componentName autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent %p (defName=%@): componentName=%@",
|
||||
self,[self definitionName],_componentName);
|
||||
}
|
||||
|
||||
ASSIGN(componentAttributes,[NSDictionary dictionaryWithDictionary:_associations]);
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent: componentAttributes=%@",componentAttributes);
|
||||
ASSIGN(_componentAttributes,[NSDictionary dictionaryWithDictionary:tmpAssociations]);
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent %p (defName=%@): componentAttributes=%@",
|
||||
self,[self definitionName],_componentAttributes);
|
||||
|
||||
ASSIGN(template,templateElement_);
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent: template=%@",template);
|
||||
ASSIGN(_template,templateElement);
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent %p (defName=%@): template=%@",
|
||||
self,[self definitionName],_template);
|
||||
|
||||
componentCache=[NSMutableDictionary new];
|
||||
_componentCache=[NSMutableDictionary new];
|
||||
};
|
||||
LOGObjectFnStopC("GSWSwitchComponent");
|
||||
return self;
|
||||
|
@ -62,10 +84,10 @@ static char rcsId[] = "$Id$";
|
|||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
DESTROY(componentName);
|
||||
DESTROY(componentAttributes);
|
||||
DESTROY(template);
|
||||
DESTROY(componentCache);
|
||||
DESTROY(_componentName);
|
||||
DESTROY(_componentAttributes);
|
||||
DESTROY(_template);
|
||||
DESTROY(_componentCache);
|
||||
[super dealloc];
|
||||
};
|
||||
|
||||
|
@ -83,103 +105,117 @@ static char rcsId[] = "$Id$";
|
|||
@implementation GSWSwitchComponent (GSWSwitchComponentA)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
GSWElement* _element=nil;
|
||||
NSString* _elementNameInContext=nil;
|
||||
GSWElement* element=nil;
|
||||
NSString* elementNameInContext=nil;
|
||||
LOGObjectFnStartC("GSWSwitchComponent");
|
||||
_elementNameInContext=[self _elementNameInContext:context_];
|
||||
[context_ appendElementIDComponent:_elementNameInContext];
|
||||
_element=[self _realComponentWithName:_elementNameInContext
|
||||
inContext:context_];
|
||||
[_element appendToResponse:response_
|
||||
inContext:context_];
|
||||
[context_ deleteLastElementIDComponent];
|
||||
elementNameInContext=[self _elementNameInContext:aContext];
|
||||
[aContext appendElementIDComponent:elementNameInContext];
|
||||
element=[self _realComponentWithName:elementNameInContext
|
||||
inContext:aContext];
|
||||
[element appendToResponse:response
|
||||
inContext:aContext];
|
||||
[aContext deleteLastElementIDComponent];
|
||||
LOGObjectFnStopC("GSWSwitchComponent");
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
GSWElement* _resultElement=nil;
|
||||
GSWElement* _element=nil;
|
||||
NSString* _elementNameInContext=nil;
|
||||
GSWElement* resultElement=nil;
|
||||
GSWElement* element=nil;
|
||||
NSString* elementNameInContext=nil;
|
||||
LOGObjectFnStartC("GSWSwitchComponent");
|
||||
_elementNameInContext=[self _elementNameInContext:context_];
|
||||
[context_ appendElementIDComponent:_elementNameInContext];
|
||||
_element=[self _realComponentWithName:_elementNameInContext
|
||||
inContext:context_];
|
||||
_resultElement=[_element invokeActionForRequest:request_
|
||||
inContext:context_];
|
||||
[context_ deleteLastElementIDComponent];
|
||||
elementNameInContext=[self _elementNameInContext:aContext];
|
||||
[aContext appendElementIDComponent:elementNameInContext];
|
||||
element=[self _realComponentWithName:elementNameInContext
|
||||
inContext:aContext];
|
||||
resultElement=[element invokeActionForRequest:request
|
||||
inContext:aContext];
|
||||
[aContext deleteLastElementIDComponent];
|
||||
LOGObjectFnStopC("GSWSwitchComponent");
|
||||
return _resultElement;
|
||||
return resultElement;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
GSWElement* _element=nil;
|
||||
NSString* _elementNameInContext=nil;
|
||||
GSWElement* element=nil;
|
||||
NSString* elementNameInContext=nil;
|
||||
LOGObjectFnStartC("GSWSwitchComponent");
|
||||
_elementNameInContext=[self _elementNameInContext:context_];
|
||||
[context_ appendElementIDComponent:_elementNameInContext];
|
||||
_element=[self _realComponentWithName:_elementNameInContext
|
||||
inContext:context_];
|
||||
[_element takeValuesFromRequest:request_
|
||||
inContext:context_];
|
||||
[context_ deleteLastElementIDComponent];
|
||||
elementNameInContext=[self _elementNameInContext:aContext];
|
||||
[aContext appendElementIDComponent:elementNameInContext];
|
||||
element=[self _realComponentWithName:elementNameInContext
|
||||
inContext:aContext];
|
||||
[element takeValuesFromRequest:request
|
||||
inContext:aContext];
|
||||
[aContext deleteLastElementIDComponent];
|
||||
LOGObjectFnStopC("GSWSwitchComponent");
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWElement*)_realComponentWithName:(NSString*)name_
|
||||
inContext:(GSWContext*)context_
|
||||
/** returns a GSWComponentReference representing component named aName
|
||||
if the component has already been created, it get it from the cache; otherwise, it is created.
|
||||
**/
|
||||
-(GSWElement*)_realComponentWithName:(NSString*)aName
|
||||
inContext:(GSWContext*)aContext
|
||||
{
|
||||
GSWElement* _element=nil;
|
||||
NSArray* _languages=nil;
|
||||
GSWElement* element=nil;
|
||||
NSArray* languages=nil;
|
||||
GSWComponent* component=nil;
|
||||
LOGObjectFnStartC("GSWSwitchComponent");
|
||||
if (!name_)
|
||||
{
|
||||
ExceptionRaise0(@"GSWSwitchComponent",@"ComponentName is null !");
|
||||
}
|
||||
component=[aContext component];
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent %p (defName=%@): componentName=%@ parent=%@",
|
||||
self,[self definitionName],_componentName,[component parent]);
|
||||
if (!aName)
|
||||
{
|
||||
ExceptionRaise0(@"GSWSwitchComponent",@"ComponentName is null !");
|
||||
}
|
||||
else
|
||||
{
|
||||
_element=[componentCache objectForKey:name_];
|
||||
if (!_element)
|
||||
{
|
||||
_languages=[context_ languages];
|
||||
_element=[GSWApp dynamicElementWithName:name_
|
||||
associations:componentAttributes
|
||||
template:template
|
||||
languages:_languages];
|
||||
if (_element)
|
||||
[componentCache setObject:_element
|
||||
forKey:name_];
|
||||
else
|
||||
{
|
||||
ExceptionRaise(@"GSWSwitchComponent: Creation failed for element named:%@",
|
||||
name_);
|
||||
};
|
||||
};
|
||||
};
|
||||
{
|
||||
element=[_componentCache objectForKey:aName];
|
||||
if (!element)
|
||||
{
|
||||
languages=[aContext languages];
|
||||
element=[GSWApp dynamicElementWithName:aName
|
||||
associations:_componentAttributes
|
||||
template:_template
|
||||
languages:languages];
|
||||
if (element)
|
||||
{
|
||||
[_componentCache setObject:element
|
||||
forKey:aName];
|
||||
}
|
||||
else
|
||||
{
|
||||
ExceptionRaise(@"GSWSwitchComponent %p (defName=%@): Creation failed for element named:%@",
|
||||
self,[self definitionName],aName);
|
||||
};
|
||||
};
|
||||
};
|
||||
LOGObjectFnStopC("GSWSwitchComponent");
|
||||
return _element;
|
||||
return element;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)_elementNameInContext:(GSWContext*)context_
|
||||
/** returns the element name by resolving _componentName association **/
|
||||
-(NSString*)_elementNameInContext:(GSWContext*)aContext
|
||||
{
|
||||
GSWComponent* _component=nil;
|
||||
NSString* _componentNameValue=nil;
|
||||
GSWComponent* component=nil;
|
||||
NSString* componentNameValue=nil;
|
||||
LOGObjectFnStartC("GSWSwitchComponent");
|
||||
_component=[context_ component];
|
||||
_componentNameValue=[componentName valueInComponent:_component];
|
||||
component=[aContext component];
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent %p (defName=%@): componentName=%@",
|
||||
self,[self definitionName],_componentName);
|
||||
componentNameValue=[_componentName valueInComponent:component];
|
||||
NSDebugMLLog(@"gswdync",@"GSWSwitchComponent %p (defName=%@): componentNameValue=%@",
|
||||
self,[self definitionName],componentNameValue);
|
||||
LOGObjectFnStopC("GSWSwitchComponent");
|
||||
return _componentNameValue;
|
||||
return componentNameValue;
|
||||
};
|
||||
|
||||
@end
|
||||
|
|
|
@ -42,20 +42,7 @@
|
|||
# after-all::
|
||||
|
||||
# Things to do before installing
|
||||
# before-install:: autodoc gsdoc
|
||||
|
||||
autodocs:
|
||||
echo $($(LIBRARY_NAME)_HEADER_FILES)
|
||||
mkdir -p Doc/tmp
|
||||
rm -f Doc/tmp/*
|
||||
autodoc -allclasses -format html -template /usr/GNUstep/System/Libraries/Resources/DocTemplates/AutoDocTemplate.gsdoc -destination Doc/tmp/ -copyright "Copyright (C) 1999-200 Free Software Foundation, Inc." -define-author-name "Manuel Guesdon" -define-author-email "mguesdon@orange-concept.com" -define-author-desc "Developer" -define-author-url "http://www.gnustep.org/developers/whoiswho.html" -define-dtd-ref "/usr/GNUstep/System/Libraries/Resources/DTDs/gsdoc-0_6_6.dtd" -define-stylesheeturl "http://www.orange-concept.com/styles/default.css" -define-basetitle "GNUstepWeb - GSWeb" -define-dtd-url "http://www.gnustep.org/gsdoc-0_6_6.xml" -define-next "[[next]]" -define-prev "[[prev]]" -define-up "[[up]]" $($(LIBRARY_NAME)_HEADER_FILES)
|
||||
mmv "Doc/tmp/*.html" "Doc/tmp/#1.gsdoc"
|
||||
mv -f Doc/tmp/*.gsdoc Doc/
|
||||
|
||||
gsdocs:
|
||||
@(cd Doc; \
|
||||
gsdoc --verbose=1 --makeRefs --makeIndex --makeIndexTemplate=/usr/GNUstep/System/Libraries/Resources/DocTemplates/indextemplate.gsdoc --projectName="GSWeb" --refs=../../../ --define-version=1.0 --location="/usr/local/doc/dev/test/gsweb/GSWeb" --define-stylesheeturl="http://www.orange-concept.com/styles/default.css" --define-basetitle="GNUstepWeb - GSWeb" --define-dtd-url="http://www.gnustep.org/gsdoc-0_6_6.xml" --define-authorName="Manuel Guesdon" --define-author-email="mguesdon@orange-concept.com" --define-authorDesc="Developer" --define-authorURL="http://www.gnustep.org/developers/whoiswho.html" --define-copyright="Copyright (C) 1999-2000 Free Software Foundation, Inc." --define-date="" --define-up="../index" "*.gsdoc" ; \
|
||||
cd ..; )
|
||||
# before-install::
|
||||
|
||||
# Things to do after installing
|
||||
after-install::
|
||||
|
|
Loading…
Reference in a new issue