2002-03-25 12:47:44 +00:00
|
|
|
/** GSWActiveImage.m - <title>GSWeb: Class GSWActiveImage</title>
|
2003-03-21 14:32:57 +00:00
|
|
|
|
|
|
|
Copyright (C) 1999-2003 Free Software Foundation, Inc.
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2002-03-25 12:47:44 +00:00
|
|
|
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
2000-01-22 12:49:49 +00:00
|
|
|
Date: Jan 1999
|
|
|
|
|
2002-03-25 12:47:44 +00:00
|
|
|
$Revision$
|
|
|
|
$Date$
|
|
|
|
|
|
|
|
<abstract></abstract>
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
This file is part of the GNUstep Web Library.
|
|
|
|
|
2002-03-25 12:47:44 +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-03-25 12:47:44 +00:00
|
|
|
</license>
|
|
|
|
**/
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2003-03-21 14:32:57 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
RCS_ID("$Id$")
|
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 GSWActiveImage
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-03-25 12:47:44 +00:00
|
|
|
-(id)initWithName:(NSString*)aName
|
|
|
|
associations:(NSDictionary*)Xassociations
|
|
|
|
contentElements:(NSArray*)elements
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
//OK
|
2002-03-25 12:47:44 +00:00
|
|
|
NSMutableDictionary* tmpAssociations=nil;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-03-25 12:47:44 +00:00
|
|
|
NSDebugMLog(@"name=%@ Xassociations:%@ elements_=%@",
|
|
|
|
aName,Xassociations,elements);
|
|
|
|
tmpAssociations=[NSMutableDictionary dictionaryWithDictionary:Xassociations];
|
|
|
|
[tmpAssociations removeObjectForKey:imageMapFileName__Key];
|
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
|
|
|
if (!WOStrictFlag)
|
|
|
|
{
|
2002-03-25 12:47:44 +00:00
|
|
|
[tmpAssociations removeObjectForKey:imageMapString__Key];
|
|
|
|
[tmpAssociations removeObjectForKey:imageMapRegions__Key];
|
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-03-25 12:47:44 +00:00
|
|
|
[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: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)
|
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-03-25 12:47:44 +00:00
|
|
|
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];
|
|
|
|
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
return self;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(void)dealloc
|
|
|
|
{
|
2002-03-25 12:47:44 +00:00
|
|
|
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);
|
2000-01-22 12:49:49 +00:00
|
|
|
[super dealloc];
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)elementName
|
|
|
|
{
|
|
|
|
return nil;//@"ELEMENTCHOSENBYCONTEXT";
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
-(NSString*)description
|
|
|
|
{
|
|
|
|
return [NSString stringWithFormat:@"<%s %p>",
|
2002-03-25 12:47:44 +00:00
|
|
|
object_get_class_name(self),
|
|
|
|
(void*)self];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2003-05-14 08:30:22 +00:00
|
|
|
@end
|
|
|
|
|
2000-01-22 12:49:49 +00:00
|
|
|
//====================================================================
|
|
|
|
@implementation GSWActiveImage (GSWActiveImageA)
|
2002-03-25 12:47:44 +00:00
|
|
|
-(GSWAssociation*)hitTestX:(int)x
|
|
|
|
y:(int)y
|
|
|
|
inRegions:(NSArray*)regions
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-03-25 12:47:44 +00:00
|
|
|
GSWAssociation* assoc=nil;
|
|
|
|
GSWGeometricRegion* region=[GSWGeometricRegion hitTestX:x
|
|
|
|
y:y
|
|
|
|
inRegions:regions];
|
|
|
|
if (region)
|
|
|
|
assoc=[GSWAssociation associationWithKeyPath:[region userDefinedString]];
|
2000-01-22 12:49:49 +00:00
|
|
|
else
|
2002-03-25 12:47:44 +00:00
|
|
|
assoc=_action;
|
|
|
|
return assoc;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWActiveImage (GSWActiveImageB)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-03-25 12:47:44 +00:00
|
|
|
-(void)takeValuesFromRequest:(GSWRequest*)request
|
|
|
|
inContext:(GSWContext*)aContext
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGObjectFnStart();
|
|
|
|
//Does nothing
|
|
|
|
LOGObjectFnStop();
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-03-25 12:47:44 +00:00
|
|
|
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request
|
|
|
|
inContext:(GSWContext*)aContext
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-03-25 12:47:44 +00:00
|
|
|
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;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStart();
|
2002-03-25 12:47:44 +00:00
|
|
|
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];
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2002-03-25 12:47:44 +00:00
|
|
|
};
|
|
|
|
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];
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2002-03-25 12:47:44 +00:00
|
|
|
actionAssociation=[self hitTestX:x
|
|
|
|
y:y
|
|
|
|
inRegions:regions];
|
|
|
|
if (actionAssociation)
|
|
|
|
{
|
|
|
|
[aContext _setActionInvoked:YES];
|
|
|
|
element=[actionAssociation valueInComponent:component];
|
2003-03-21 14:32:57 +00:00
|
|
|
NSAssert4(!element || [element isKindOfClass:[GSWElement class]],
|
|
|
|
@"actionAssociation=%@, component=%@ Element is a %@ not a GSWElement: %@",
|
|
|
|
actionAssociation,
|
|
|
|
component,
|
|
|
|
[element class],
|
|
|
|
element);
|
2002-03-25 12:47:44 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (_href)
|
|
|
|
{
|
|
|
|
[aContext _setActionInvoked:YES];
|
|
|
|
//TODO redirect to href
|
|
|
|
}
|
|
|
|
else if (_action)
|
|
|
|
{
|
|
|
|
[aContext _setActionInvoked:YES];
|
|
|
|
element=[_action valueInComponent:component];
|
2003-03-21 14:32:57 +00:00
|
|
|
NSAssert4(!element || [element isKindOfClass:[GSWElement class]],
|
|
|
|
@"_action=%@, component=%@ Element is a %@ not a GSWElement: %@",
|
|
|
|
_action,
|
|
|
|
component,
|
|
|
|
[element class],
|
|
|
|
element);
|
2002-03-25 12:47:44 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
NSDebugMLLog0(@"gswdync",@"GSWActiveImage Couldn't trigger action.");
|
|
|
|
};
|
|
|
|
};
|
|
|
|
if (!element)
|
2003-03-21 14:32:57 +00:00
|
|
|
{
|
|
|
|
element=[aContext page];
|
|
|
|
NSAssert2(!element || [element isKindOfClass:[GSWElement class]],
|
|
|
|
@"Element is a %@ not a GSWElement: %@",
|
|
|
|
[element class],
|
|
|
|
element);
|
|
|
|
};
|
2002-03-25 12:47:44 +00:00
|
|
|
}
|
|
|
|
else
|
2003-03-21 14:32:57 +00:00
|
|
|
{
|
|
|
|
element=[super invokeActionForRequest:request
|
|
|
|
inContext:aContext];
|
|
|
|
NSAssert2(!element || [element isKindOfClass:[GSWElement class]],
|
|
|
|
@"Element is a %@ not a GSWElement: %@",
|
|
|
|
[element class],
|
|
|
|
element);
|
|
|
|
};
|
2002-03-25 12:47:44 +00:00
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
else
|
2003-03-21 14:32:57 +00:00
|
|
|
{
|
|
|
|
element=[super invokeActionForRequest:request
|
|
|
|
inContext:aContext];
|
|
|
|
NSAssert2(!element || [element isKindOfClass:[GSWElement class]],
|
|
|
|
@"Element is a %@ not a GSWElement: %@",
|
|
|
|
[element class],
|
|
|
|
element);
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStop();
|
2002-03-25 12:47:44 +00:00
|
|
|
return element;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-03-25 12:47:44 +00:00
|
|
|
-(void)appendToResponse:(GSWResponse*)response
|
|
|
|
inContext:(GSWContext*)aContext
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
//OK
|
2003-03-21 14:32:57 +00:00
|
|
|
//GSWRequest* _request=[aContext request];
|
|
|
|
//Unused now BOOL isFromClientComponent=[_request isFromClientComponent];
|
2002-03-25 12:47:44 +00:00
|
|
|
BOOL disabledInContext=[self disabledInContext:aContext];
|
|
|
|
BOOL isInForm=NO;
|
|
|
|
isInForm=[aContext isInForm]; //TODO
|
|
|
|
if (isInForm)
|
|
|
|
{
|
|
|
|
if (!disabledInContext)
|
|
|
|
[response _appendContentAsciiString:@"<INPUT "];
|
|
|
|
else
|
|
|
|
[response _appendContentAsciiString:@"<IMG "];
|
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
else
|
2002-03-25 12:47:44 +00:00
|
|
|
{
|
|
|
|
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>"];
|
|
|
|
};
|
|
|
|
};
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-03-25 12:47:44 +00:00
|
|
|
-(NSString*)frameworkNameInContext:(GSWContext*)aContext
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
//OK
|
2002-03-25 12:47:44 +00:00
|
|
|
NSString* frameworkName=nil;
|
|
|
|
GSWComponent* component=[aContext component];
|
|
|
|
NSDebugMLog(@"_framework=%@",_framework);
|
|
|
|
if (_framework)
|
|
|
|
frameworkName=[_framework valueInComponent:component];
|
2000-01-22 12:49:49 +00:00
|
|
|
else
|
2002-03-25 12:47:44 +00:00
|
|
|
frameworkName=[component frameworkName];
|
|
|
|
return frameworkName;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
2002-03-25 12:47:44 +00:00
|
|
|
-(NSString*)imageSourceInContext:(GSWContext*)aContext
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-03-25 12:47:44 +00:00
|
|
|
GSWComponent* component=nil;
|
|
|
|
NSString* imageSource=nil;
|
|
|
|
component=[aContext component];
|
|
|
|
imageSource=[_src valueInComponent:component];
|
|
|
|
return imageSource;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
|
|
|
//NDFN
|
2002-03-25 12:47:44 +00:00
|
|
|
-(NSString*)hrefInContext:(GSWContext*)aContext
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-03-25 12:47:44 +00:00
|
|
|
GSWComponent* component=nil;
|
|
|
|
NSString* hrefValue=nil;
|
|
|
|
component=[aContext component];
|
|
|
|
hrefValue=[_href valueInComponent:component];
|
|
|
|
return hrefValue;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
@end
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWActiveImage (GSWActiveImageC)
|
2002-03-25 12:47:44 +00:00
|
|
|
-(void)appendGSWebObjectsAssociationsToResponse:(GSWResponse*)response
|
|
|
|
inContext:(GSWContext*)aContext
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
//OK
|
2002-03-25 12:47:44 +00:00
|
|
|
NSString* url=nil;
|
|
|
|
GSWComponent* component=nil;
|
|
|
|
id data=nil;
|
|
|
|
id mimeTypeValue=nil;
|
|
|
|
GSWURLValuedElementData* dataValue=nil;
|
|
|
|
GSWResourceManager* resourceManager=nil;
|
|
|
|
BOOL disabledInContext=NO;
|
|
|
|
BOOL isInForm=NO;
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStartC("GSWActiveImage");
|
2002-03-25 12:47:44 +00:00
|
|
|
NSDebugMLLog(@"gswdync",@"elementID=%@",[aContext elementID]);
|
|
|
|
component=[aContext component];
|
|
|
|
disabledInContext=[self disabledInContext:aContext];
|
|
|
|
isInForm=[aContext isInForm];
|
2000-08-01 10:03:56 +00:00
|
|
|
|
2002-03-25 12:47:44 +00:00
|
|
|
if (!disabledInContext)
|
2000-08-01 10:03:56 +00:00
|
|
|
{
|
2002-03-25 12:47:44 +00:00
|
|
|
if (isInForm)
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-03-25 12:47:44 +00:00
|
|
|
NSString* nameInContext=[self nameInContext:aContext];
|
|
|
|
[response _appendContentAsciiString:@" type=image"];
|
|
|
|
[response _appendContentAsciiString:@" name=\""];
|
|
|
|
[response appendContentHTMLAttributeValue:nameInContext];
|
|
|
|
[response appendContentCharacter:'"'];
|
2000-01-22 12:49:49 +00:00
|
|
|
}
|
2000-08-01 10:03:56 +00:00
|
|
|
else
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-03-25 12:47:44 +00:00
|
|
|
[response _appendContentAsciiString:@" ismap"];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
2000-08-01 10:03:56 +00:00
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2002-03-25 12:47:44 +00:00
|
|
|
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];
|
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
else
|
2002-03-25 12:47:44 +00:00
|
|
|
{
|
|
|
|
GSWDynamicURLString* componentActionURL=[aContext componentActionURL];
|
|
|
|
NSDebugMLLog(@"gswdync",@"componentActionURL=%@",componentActionURL);
|
|
|
|
[response appendContentString:(NSString*)componentActionURL];
|
|
|
|
};
|
|
|
|
[response appendContentCharacter:'"'];
|
|
|
|
NSDebugMLLog(@"gswdync",@"elementID=%@",[aContext elementID]);
|
2000-01-22 12:49:49 +00:00
|
|
|
LOGObjectFnStopC("GSWActiveImage");
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
@implementation GSWActiveImage (GSWActiveImageD)
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-03-25 12:47:44 +00:00
|
|
|
-(BOOL)appendStringAtRight:(id)unkwnon
|
|
|
|
withMapping:(char*)mapping
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGObjectFnNotImplemented(); //TODOFN
|
|
|
|
return NO;
|
|
|
|
};
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------
|
2002-03-25 12:47:44 +00:00
|
|
|
-(BOOL)appendStringAtLeft:(id)unkwnon
|
|
|
|
withMapping:(char*)mapping
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
|
|
|
LOGObjectFnNotImplemented(); //TODOFN
|
|
|
|
return NO;
|
|
|
|
};
|
|
|
|
@end
|
|
|
|
|