mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-04-23 15:33:43 +00:00
2002-05-14 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWSubmitButton.m: o corrected setActionInvoked into _setActionInvoked * GSWeb.framework/GSWGeometricRegion.h,.m: o ivar names changes to conform to coding standards o headers changed for gsdoc * GSWAssociation.h: o ivar names changes to conform to coding standards o headers changed for gsdoc * GSWAssociation.m: o ivar names changes to conform to coding standards o headers changed for gsdoc o logs * GSWForm.h,.m: o ivar names changes to conform to coding standards o headers changed for gsdoc * GSWContext.h: o Changed return type of -elementID and -senderID * GSWContext.m: o Changed return type of -elementID and -senderID * GSWDisplayGroup.m: o logs * GSWeb.framework/GSWPopUpButton.h,.m: o added count & index parameters (like GSWRepetition) * GSWTextField.m: o handling exception in takeValue * GSWText.m: o handling exception in takeValue * GSWInput.m: o corrected bug in akeValuesFromRequest:inContext: * GSWExtensionsGSW.framework: o added GSWFileUploadComponent * GSWExtensionsGSW.framework/GNUmakefile o added GSWFileUploadComponent * GSWComponent.h: o added -definitionName o ivar names changes to conform to coding standards o headers changed for gsdoc * GSWComponent.m: o added -definitionName o added exception handling for debugging purpose o ivar names changes to conform to coding standards o headers changed for gsdoc * GSWKeyValueAssociation.m: o logs * GSWConstantValueAssociation.m: o logs * GSWApplication.h: o added -saveResponsesPath * GSWApplication.m: o added -saveResponsesPath o added GSWOPT_SaveResponsesPath o added exception handling for debugging purpose * GSWConstants.h/.m: o added GSWOPT_SaveResponsesPath * GSWConfig.h: o added GSWOPTVALUE_SaveResponsesPath * GSWDefaultAdaptorThread.h: o add response saving * GSWDefaultAdaptorThread.m: o add response saving * GSWeb.framework/GSWResponse.m o added -appendDebugCommentContentString: git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@13651 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7151edc54d
commit
9de4faa97f
37 changed files with 3499 additions and 2944 deletions
64
ChangeLog
64
ChangeLog
|
@ -1,3 +1,67 @@
|
|||
2002-05-14 Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
* GSWeb.framework/GSWSubmitButton.m:
|
||||
o corrected setActionInvoked into _setActionInvoked
|
||||
* GSWeb.framework/GSWGeometricRegion.h,.m:
|
||||
o ivar names changes to conform to coding standards
|
||||
o headers changed for gsdoc
|
||||
* GSWAssociation.h:
|
||||
o ivar names changes to conform to coding standards
|
||||
o headers changed for gsdoc
|
||||
* GSWAssociation.m:
|
||||
o ivar names changes to conform to coding standards
|
||||
o headers changed for gsdoc
|
||||
o logs
|
||||
* GSWForm.h,.m:
|
||||
o ivar names changes to conform to coding standards
|
||||
o headers changed for gsdoc
|
||||
* GSWContext.h:
|
||||
o Changed return type of -elementID and -senderID
|
||||
* GSWContext.m:
|
||||
o Changed return type of -elementID and -senderID
|
||||
* GSWDisplayGroup.m:
|
||||
o logs
|
||||
* GSWeb.framework/GSWPopUpButton.h,.m:
|
||||
o added count & index parameters (like GSWRepetition)
|
||||
* GSWTextField.m:
|
||||
o handling exception in takeValue
|
||||
* GSWText.m:
|
||||
o handling exception in takeValue
|
||||
* GSWInput.m:
|
||||
o corrected bug in akeValuesFromRequest:inContext:
|
||||
* GSWExtensionsGSW.framework:
|
||||
o added GSWFileUploadComponent
|
||||
* GSWExtensionsGSW.framework/GNUmakefile
|
||||
o added GSWFileUploadComponent
|
||||
* GSWComponent.h:
|
||||
o added -definitionName
|
||||
o ivar names changes to conform to coding standards
|
||||
o headers changed for gsdoc
|
||||
* GSWComponent.m:
|
||||
o added -definitionName
|
||||
o added exception handling for debugging purpose
|
||||
o ivar names changes to conform to coding standards
|
||||
o headers changed for gsdoc
|
||||
* GSWKeyValueAssociation.m:
|
||||
o logs
|
||||
* GSWConstantValueAssociation.m:
|
||||
o logs
|
||||
* GSWApplication.h:
|
||||
o added -saveResponsesPath
|
||||
* GSWApplication.m:
|
||||
o added -saveResponsesPath
|
||||
o added GSWOPT_SaveResponsesPath
|
||||
o added exception handling for debugging purpose
|
||||
* GSWConstants.h/.m:
|
||||
o added GSWOPT_SaveResponsesPath
|
||||
* GSWConfig.h:
|
||||
o added GSWOPTVALUE_SaveResponsesPath
|
||||
* GSWDefaultAdaptorThread.h:
|
||||
o add response saving
|
||||
* GSWDefaultAdaptorThread.m:
|
||||
o add response saving
|
||||
* GSWeb.framework/GSWResponse.m
|
||||
o added -appendDebugCommentContentString:
|
||||
|
||||
2002-04-15 Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
* GSWDynamicURLString.h:
|
||||
o remove NSMutableString protocol
|
||||
|
|
|
@ -44,7 +44,8 @@ GSWTabComponent.gswc \
|
|||
GSWValidationFailureComponent.gswc \
|
||||
GSWLogin.gswc \
|
||||
GSWSimpleFormComponent.gswc \
|
||||
GSWFileUploadFormComponent.gswc
|
||||
GSWFileUploadFormComponent.gswc \
|
||||
GSWFileUploadComponent.gswc
|
||||
|
||||
GSWExtensionsGSW_LANGUAGES= \
|
||||
French
|
||||
|
@ -70,14 +71,17 @@ GSWLogin.m \
|
|||
GSWTabComponent.m \
|
||||
GSWValidationFailureComponent.m \
|
||||
GSWSimpleFormComponent.m \
|
||||
GSWFileUploadFormComponent.m
|
||||
GSWFileUploadFormComponent.m \
|
||||
GSWFileUploadComponent.m
|
||||
|
||||
# The header files to be installed
|
||||
GSWExtensionsGSW_HEADER_FILES = \
|
||||
GSWLogin.h \
|
||||
GSWTabComponent.h \
|
||||
GSWValidationFailureComponent.h \
|
||||
GSWFileUploadFormComponent.h
|
||||
GSWFileUploadFormComponent.h \
|
||||
GSWFileUploadComponent.h \
|
||||
|
||||
|
||||
SRCS = $(LIBRARY_NAME:=.m)
|
||||
HDRS = $(LIBRARY_NAME:=.h)
|
||||
|
|
|
@ -10,6 +10,40 @@ ViewCondition: GSWConditional
|
|||
condition = isViewEnabled;
|
||||
};
|
||||
|
||||
ViewPathCondition: GSWConditional
|
||||
{
|
||||
condition = ^isURLView;
|
||||
negate = YES;
|
||||
};
|
||||
|
||||
ViewURLCondition: GSWConditional
|
||||
{
|
||||
condition = ^isURLView;
|
||||
};
|
||||
|
||||
LinkViewCondition: GSWConditional
|
||||
{
|
||||
condition = ^isImageView;
|
||||
negate = YES;
|
||||
};
|
||||
|
||||
ImageViewCondition: GSWConditional
|
||||
{
|
||||
condition = ^isImageView;
|
||||
};
|
||||
|
||||
ImageWithPath: GSWImage
|
||||
{
|
||||
filename = fileInfo.filePath;
|
||||
border = 0;
|
||||
};
|
||||
|
||||
ImageWithURL: GSWImage
|
||||
{
|
||||
src = fileInfo.fileURL;
|
||||
border = 0;
|
||||
};
|
||||
|
||||
UploadFile: GSWFileUpload
|
||||
{
|
||||
data = fileInfo.data;
|
||||
|
@ -17,8 +51,7 @@ UploadFile: GSWFileUpload
|
|||
enabled=^isUploadEnabled;
|
||||
};
|
||||
|
||||
|
||||
FileLink: GSWHyperlink
|
||||
FileLinkWithPath: GSWHyperlink
|
||||
{
|
||||
filename=fileInfo.filePath;
|
||||
data=fileInfo.data;
|
||||
|
@ -28,6 +61,14 @@ FileLink: GSWHyperlink
|
|||
target = ^target;
|
||||
};
|
||||
|
||||
FileLinkWithURL: GSWHyperlink
|
||||
{
|
||||
src=fileInfo.fileURL;
|
||||
string= ^string;
|
||||
target = ^target;
|
||||
};
|
||||
|
||||
|
||||
SubmitButton: GSWSubmitButton
|
||||
{
|
||||
enabled=^isUploadEnabled;
|
||||
|
@ -44,4 +85,5 @@ DeleteButton: GSWSubmitButton
|
|||
enabled=^isUploadEnabled;
|
||||
value= ^deleteButtonText;
|
||||
action = deleteAction;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -1,10 +1,26 @@
|
|||
<gsweb name="Form">
|
||||
<gsweb name="ViewCondition">
|
||||
<gsweb name="FileLink"></gsweb>
|
||||
<gsweb name="Form">
|
||||
<gsweb name="ViewCondition">
|
||||
<gsweb name="ViewPathCondition">
|
||||
<gsweb name="LinkViewCondition">
|
||||
<gsweb name="FileLinkWithPath"></gsweb>
|
||||
</gsweb>
|
||||
<gsweb name="ImageViewCondition">
|
||||
<gsweb name="ImageWithPath"></gsweb>
|
||||
</gsweb>
|
||||
</gsweb>
|
||||
<gsweb name="ViewURLCondition">
|
||||
<gsweb name="LinkViewCondition">
|
||||
<gsweb name="FileLinkWithURL"></gsweb>
|
||||
</gsweb>
|
||||
<gsweb name="ImageViewCondition">
|
||||
<gsweb name="ImageWithURL"></gsweb>
|
||||
</gsweb>
|
||||
</gsweb>
|
||||
</gsweb>
|
||||
<gsweb name="UploadFile"></gsweb><br>
|
||||
<gsweb name="SubmitButton"></gsweb>
|
||||
<gsweb name="DeleteCondition">
|
||||
<gsweb name="DeleteButton"></gsweb>
|
||||
</gsweb>
|
||||
</gsweb>
|
||||
<gsweb name="UploadFile"></gsweb><br>
|
||||
<gsweb name="SubmitButton"></gsweb>
|
||||
<gsweb name="DeleteCondition">
|
||||
<gsweb name="DeleteButton"></gsweb>
|
||||
</gsweb>
|
||||
</gsweb>
|
||||
|
|
@ -97,14 +97,17 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
BOOL isViewEnabled=YES;
|
||||
if ([self hasBinding:@"isViewEnabled"])
|
||||
{
|
||||
id isViewEnabledObject=[self valueForBinding:@"isViewEnabled"];
|
||||
isViewEnabled=boolValueFor(isViewEnabledObject);
|
||||
};
|
||||
{
|
||||
id isViewEnabledObject=[self valueForBinding:@"isViewEnabled"];
|
||||
isViewEnabled=boolValueFor(isViewEnabledObject);
|
||||
};
|
||||
if (isViewEnabled)
|
||||
{
|
||||
isViewEnabled=([[self fileInfo]objectForKey:@"data"]!=nil);
|
||||
};
|
||||
{
|
||||
NSMutableDictionary* fileInfo=[self fileInfo];
|
||||
isViewEnabled=([fileInfo objectForKey:@"data"]!=nil
|
||||
|| [fileInfo objectForKey:@"filePath"]!=nil
|
||||
|| [fileInfo objectForKey:@"fileURL"]!=nil);
|
||||
};
|
||||
return isViewEnabled;
|
||||
};
|
||||
|
||||
|
@ -113,14 +116,17 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
BOOL isDeleteEnabled=NO;
|
||||
if ([self hasBinding:@"isDeleteEnabled"])
|
||||
{
|
||||
id isDeleteEnabledObject=[self valueForBinding:@"isDeleteEnabled"];
|
||||
isDeleteEnabled=boolValueFor(isDeleteEnabledObject);
|
||||
};
|
||||
{
|
||||
id isDeleteEnabledObject=[self valueForBinding:@"isDeleteEnabled"];
|
||||
isDeleteEnabled=boolValueFor(isDeleteEnabledObject);
|
||||
};
|
||||
if (isDeleteEnabled)
|
||||
{
|
||||
isDeleteEnabled=([[self fileInfo]objectForKey:@"data"]!=nil);
|
||||
};
|
||||
{
|
||||
NSMutableDictionary* fileInfo=[self fileInfo];
|
||||
isDeleteEnabled=([fileInfo objectForKey:@"data"]!=nil
|
||||
|| [fileInfo objectForKey:@"filePath"]!=nil
|
||||
|| [fileInfo objectForKey:@"fileURL"]!=nil);
|
||||
};
|
||||
return isDeleteEnabled;
|
||||
};
|
||||
|
||||
|
|
|
@ -527,6 +527,8 @@ extern BOOL WOStrictFlag;
|
|||
+(NSTimeInterval)sessionTimeOutValue;
|
||||
+(NSString*)debugSetConfigFilePath;//NDFN
|
||||
+(void)setDebugSetConfigFilePath:(NSString*)debugSetConfigFilePath_;//NDFN
|
||||
+(NSString*)saveResponsesPath;//NDFN
|
||||
+(void)setSaveResponsesPath:(NSString*)saveResponsesPath;//NDFN
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
|
|
|
@ -211,69 +211,113 @@ int GSWApplicationMainReal(NSString* _applicationClassName,
|
|||
{
|
||||
NSDictionary* _defaultsOptions=nil;
|
||||
globalAppDefaultOptions=[[GSWApplication bundleInfo] objectForKey:@"defaults"];
|
||||
NSDebugFLog(@"globalAppDefaultOptions=%@",globalAppDefaultOptions);
|
||||
NSDebugFLLog(@"options",@"globalAppDefaultOptions=%@",globalAppDefaultOptions);
|
||||
|
||||
NSDebugFLog(@"GSWebNamingConv=%d",GSWebNamingConv);
|
||||
NSCAssert1((GSWebNamingConv==WONAMES_INDEX || GSWebNamingConv==GSWNAMES_INDEX),@"GSWebNamingConv=%d",GSWebNamingConv);
|
||||
NSDebugFLLog(@"options",@"GSWebNamingConv=%d",GSWebNamingConv);
|
||||
NSCAssert1((GSWebNamingConv==WONAMES_INDEX || GSWebNamingConv==GSWNAMES_INDEX),
|
||||
@"GSWebNamingConv=%d",GSWebNamingConv);
|
||||
|
||||
NSDebugFLog(@"GSWClassName_DefaultAdaptor -> %@",GSWClassName_DefaultAdaptor[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPT_Adaptor -> %@",GSWOPT_Adaptor[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPT_AdditionalAdaptors -> %@",GSWOPT_AdditionalAdaptors[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPTVALUE_ApplicationBaseURL_WO -> %@",GSWOPTVALUE_ApplicationBaseURL_WO);
|
||||
NSDebugFLog(@"GSWOPTVALUE_ApplicationBaseURL_GSWEB -> %@",GSWOPTVALUE_ApplicationBaseURL_GSWEB);
|
||||
NSDebugFLog(@"GSWOPT_ApplicationBaseURL -> %@",GSWOPT_ApplicationBaseURL[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPTVALUE_AutoOpenInBrowser -> %@",GSWOPTVALUE_AutoOpenInBrowser);
|
||||
NSDebugFLog(@"GSWOPT_AutoOpenInBrowser -> %@",GSWOPT_AutoOpenInBrowser[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPTVALUE_CGIAdaptorURL_WO -> %@",GSWOPTVALUE_CGIAdaptorURL_WO);
|
||||
NSDebugFLog(@"GSWOPTVALUE_CGIAdaptorURL_GSWEB -> %@",GSWOPTVALUE_CGIAdaptorURL_GSWEB);
|
||||
NSDebugFLog(@"GSWOPT_CGIAdaptorURL -> %@",GSWOPT_CGIAdaptorURL[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPTVALUE_CachingEnabled -> %@",GSWOPTVALUE_CachingEnabled);
|
||||
NSDebugFLog(@"GSWOPT_CachingEnabled -> %@",GSWOPT_CachingEnabled[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWComponentRequestHandlerKey -> %@",GSWComponentRequestHandlerKey[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPT_ComponentRequestHandlerKey -> %@",GSWOPT_ComponentRequestHandlerKey[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPTVALUE_DebuggingEnabled -> %@",GSWOPTVALUE_DebuggingEnabled);
|
||||
NSDebugFLog(@"GSWOPT_DebuggingEnabled -> %@",GSWOPT_DebuggingEnabled[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPTVALUE_StatusDebuggingEnabled -> %@",GSWOPTVALUE_StatusDebuggingEnabled);
|
||||
NSDebugFLog(@"GSWOPT_StatusDebuggingEnabled -> %@",GSWOPT_StatusDebuggingEnabled[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWDirectActionRequestHandlerKey -> %@",GSWDirectActionRequestHandlerKey[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPT_DirectActionRequestHandlerKey -> %@",GSWOPT_DirectActionRequestHandlerKey[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPTVALUE_DirectConnectEnabled -> %@",GSWOPTVALUE_DirectConnectEnabled);
|
||||
NSDebugFLog(@"GSWOPT_DirectConnectEnabled -> %@",GSWOPT_DirectConnectEnabled[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPTVALUE_FrameworksBaseURL -> %@",GSWOPTVALUE_FrameworksBaseURL);
|
||||
NSDebugFLog(@"GSWOPT_FrameworksBaseURL -> %@",GSWOPT_FrameworksBaseURL[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPTVALUE_IncludeCommentsInResponse -> %@",GSWOPTVALUE_IncludeCommentsInResponse);
|
||||
NSDebugFLog(@"GSWOPT_IncludeCommentsInResponse -> %@",GSWOPT_IncludeCommentsInResponse[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPTVALUE_ListenQueueSize -> %@",GSWOPTVALUE_ListenQueueSize);
|
||||
NSDebugFLog(@"GSWOPT_ListenQueueSize -> %@",GSWOPT_ListenQueueSize[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPT_LoadFrameworks -> %@",GSWOPT_LoadFrameworks[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPTVALUE_MonitorEnabled -> %@",GSWOPTVALUE_MonitorEnabled);
|
||||
NSDebugFLog(@"GSWOPT_MonitorEnabled -> %@",GSWOPT_MonitorEnabled[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPTVALUE_MonitorHost -> %@",GSWOPTVALUE_MonitorHost);
|
||||
NSDebugFLog(@"GSWOPT_MonitorHost -> %@",GSWOPT_MonitorHost[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPTVALUE_Port -> %@",GSWOPTVALUE_Port);
|
||||
NSDebugFLog(@"GSWOPT_Port -> %@",GSWOPT_Port[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWResourceRequestHandlerKey -> %@",GSWResourceRequestHandlerKey[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPT_ResourceRequestHandlerKey -> %@",GSWOPT_ResourceRequestHandlerKey[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPTVALUE_SMTPHost -> %@",GSWOPTVALUE_SMTPHost);
|
||||
NSDebugFLog(@"GSWOPT_SMTPHost -> %@",GSWOPT_SMTPHost[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPTVALUE_SessionTimeOut -> %@",GSWOPTVALUE_SessionTimeOut);
|
||||
NSDebugFLog(@"GSWOPT_SessionTimeOut -> %@",
|
||||
NSDebugFLLog(@"options",@"GSWClassName_DefaultAdaptor -> %@",
|
||||
GSWClassName_DefaultAdaptor[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWOPT_Adaptor -> %@",
|
||||
GSWOPT_Adaptor[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWOPT_AdditionalAdaptors -> %@",
|
||||
GSWOPT_AdditionalAdaptors[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWOPTVALUE_ApplicationBaseURL_WO -> %@",
|
||||
GSWOPTVALUE_ApplicationBaseURL_WO);
|
||||
NSDebugFLLog(@"options",@"GSWOPTVALUE_ApplicationBaseURL_GSWEB -> %@",
|
||||
GSWOPTVALUE_ApplicationBaseURL_GSWEB);
|
||||
NSDebugFLLog(@"options",@"GSWOPT_ApplicationBaseURL -> %@",
|
||||
GSWOPT_ApplicationBaseURL[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWOPTVALUE_AutoOpenInBrowser -> %@",
|
||||
GSWOPTVALUE_AutoOpenInBrowser);
|
||||
NSDebugFLLog(@"options",@"GSWOPT_AutoOpenInBrowser -> %@",
|
||||
GSWOPT_AutoOpenInBrowser[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWOPTVALUE_CGIAdaptorURL_WO -> %@",
|
||||
GSWOPTVALUE_CGIAdaptorURL_WO);
|
||||
NSDebugFLLog(@"options",@"GSWOPTVALUE_CGIAdaptorURL_GSWEB -> %@",
|
||||
GSWOPTVALUE_CGIAdaptorURL_GSWEB);
|
||||
NSDebugFLLog(@"options",@"GSWOPT_CGIAdaptorURL -> %@",
|
||||
GSWOPT_CGIAdaptorURL[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWOPTVALUE_CachingEnabled -> %@",
|
||||
GSWOPTVALUE_CachingEnabled);
|
||||
NSDebugFLLog(@"options",@"GSWOPT_CachingEnabled -> %@",
|
||||
GSWOPT_CachingEnabled[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWComponentRequestHandlerKey -> %@",
|
||||
GSWComponentRequestHandlerKey[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWOPT_ComponentRequestHandlerKey -> %@",
|
||||
GSWOPT_ComponentRequestHandlerKey[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWOPTVALUE_DebuggingEnabled -> %@",
|
||||
GSWOPTVALUE_DebuggingEnabled);
|
||||
NSDebugFLLog(@"options",@"GSWOPT_DebuggingEnabled -> %@",
|
||||
GSWOPT_DebuggingEnabled[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWOPTVALUE_StatusDebuggingEnabled -> %@",
|
||||
GSWOPTVALUE_StatusDebuggingEnabled);
|
||||
NSDebugFLLog(@"options",@"GSWOPT_StatusDebuggingEnabled -> %@",
|
||||
GSWOPT_StatusDebuggingEnabled[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWDirectActionRequestHandlerKey -> %@",
|
||||
GSWDirectActionRequestHandlerKey[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWOPT_DirectActionRequestHandlerKey -> %@",
|
||||
GSWOPT_DirectActionRequestHandlerKey[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWOPTVALUE_DirectConnectEnabled -> %@",
|
||||
GSWOPTVALUE_DirectConnectEnabled);
|
||||
NSDebugFLLog(@"options",@"GSWOPT_DirectConnectEnabled -> %@",
|
||||
GSWOPT_DirectConnectEnabled[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWOPTVALUE_FrameworksBaseURL -> %@",
|
||||
GSWOPTVALUE_FrameworksBaseURL);
|
||||
NSDebugFLLog(@"options",@"GSWOPT_FrameworksBaseURL -> %@",
|
||||
GSWOPT_FrameworksBaseURL[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWOPTVALUE_IncludeCommentsInResponse -> %@",
|
||||
GSWOPTVALUE_IncludeCommentsInResponse);
|
||||
NSDebugFLLog(@"options",@"GSWOPT_IncludeCommentsInResponse -> %@",
|
||||
GSWOPT_IncludeCommentsInResponse[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWOPTVALUE_ListenQueueSize -> %@",
|
||||
GSWOPTVALUE_ListenQueueSize);
|
||||
NSDebugFLLog(@"options",@"GSWOPT_ListenQueueSize -> %@",
|
||||
GSWOPT_ListenQueueSize[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWOPT_LoadFrameworks -> %@",
|
||||
GSWOPT_LoadFrameworks[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWOPTVALUE_MonitorEnabled -> %@",
|
||||
GSWOPTVALUE_MonitorEnabled);
|
||||
NSDebugFLLog(@"options",@"GSWOPT_MonitorEnabled -> %@",
|
||||
GSWOPT_MonitorEnabled[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWOPTVALUE_MonitorHost -> %@",
|
||||
GSWOPTVALUE_MonitorHost);
|
||||
NSDebugFLLog(@"options",@"GSWOPT_MonitorHost -> %@",
|
||||
GSWOPT_MonitorHost[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWOPTVALUE_Port -> %@",
|
||||
GSWOPTVALUE_Port);
|
||||
NSDebugFLLog(@"options",@"GSWOPT_Port -> %@",
|
||||
GSWOPT_Port[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWResourceRequestHandlerKey -> %@",
|
||||
GSWResourceRequestHandlerKey[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWOPT_ResourceRequestHandlerKey -> %@",
|
||||
GSWOPT_ResourceRequestHandlerKey[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWOPTVALUE_SMTPHost -> %@",
|
||||
GSWOPTVALUE_SMTPHost);
|
||||
NSDebugFLLog(@"options",@"GSWOPT_SMTPHost -> %@",
|
||||
GSWOPT_SMTPHost[GSWebNamingConv]);
|
||||
NSDebugFLLog(@"options",@"GSWOPTVALUE_SessionTimeOut -> %@",
|
||||
GSWOPTVALUE_SessionTimeOut);
|
||||
NSDebugFLLog(@"options",@"GSWOPT_SessionTimeOut -> %@",
|
||||
GSWOPT_SessionTimeOut[GSWebNamingConv]);
|
||||
|
||||
NSDebugFLog(@"GSWOPTVALUE_WorkerThreadCount -> %@",
|
||||
NSDebugFLLog(@"options",@"GSWOPTVALUE_WorkerThreadCount -> %@",
|
||||
GSWOPTVALUE_WorkerThreadCount);
|
||||
NSDebugFLog(@"GSWOPT_WorkerThreadCount -> %@",
|
||||
NSDebugFLLog(@"options",@"GSWOPT_WorkerThreadCount -> %@",
|
||||
GSWOPT_WorkerThreadCount[GSWebNamingConv]);
|
||||
|
||||
NSDebugFLog(@"GSWOPTVALUE_MultiThreadEnabled -> %@",
|
||||
NSDebugFLLog(@"options",@"GSWOPTVALUE_MultiThreadEnabled -> %@",
|
||||
GSWOPTVALUE_MultiThreadEnabled);
|
||||
NSDebugFLog(@"GSWOPT_MultiThreadEnabled -> %@",
|
||||
NSDebugFLLog(@"options",@"GSWOPT_MultiThreadEnabled -> %@",
|
||||
GSWOPT_MultiThreadEnabled);
|
||||
|
||||
NSDebugFLog(@"GSWOPT_AdaptorHost -> %@",
|
||||
NSDebugFLLog(@"options",@"GSWOPT_AdaptorHost -> %@",
|
||||
GSWOPT_AdaptorHost[GSWebNamingConv]);
|
||||
NSDebugFLog(@"GSWOPTVALUE_AdaptorHost -> %@",
|
||||
NSDebugFLLog(@"options",@"GSWOPTVALUE_AdaptorHost -> %@",
|
||||
GSWOPTVALUE_AdaptorHost);
|
||||
NSDebugFLLog(@"options",@"GSWOPTVALUE_SaveResponsesPath -> %@",
|
||||
GSWOPTVALUE_SaveResponsesPath);
|
||||
|
||||
_defaultsOptions =
|
||||
[NSDictionary dictionaryWithObjectsAndKeys:
|
||||
|
@ -303,11 +347,12 @@ int GSWApplicationMainReal(NSString* _applicationClassName,
|
|||
GSWOPTVALUE_WorkerThreadCount, GSWOPT_WorkerThreadCount[GSWebNamingConv],
|
||||
GSWOPTVALUE_MultiThreadEnabled, GSWOPT_MultiThreadEnabled,
|
||||
GSWOPTVALUE_AdaptorHost, GSWOPT_AdaptorHost[GSWebNamingConv],
|
||||
GSWOPTVALUE_SaveResponsesPath, GSWOPT_SaveResponsesPath[GSWebNamingConv],
|
||||
nil, nil];
|
||||
NSDebugFLog(@"_globalAppDefaultOptions=%@",globalAppDefaultOptions);
|
||||
NSDebugFLLog(@"options",@"_globalAppDefaultOptions=%@",globalAppDefaultOptions);
|
||||
globalAppDefaultOptions=[NSDictionary dictionaryWithDictionary:globalAppDefaultOptions
|
||||
andDefaultEntriesFromDictionary:_defaultsOptions];
|
||||
NSDebugFLog(@"_globalAppDefaultOptions=%@",globalAppDefaultOptions);
|
||||
NSDebugFLLog(@"options",@"_globalAppDefaultOptions=%@",globalAppDefaultOptions);
|
||||
};
|
||||
[defaults registerDefaults:globalAppDefaultOptions];
|
||||
|
||||
|
@ -1777,6 +1822,8 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
_session=[context_ existingSession];
|
||||
NSDebugMLLog(@"sessions",@"_session=%@",_session);
|
||||
if (_session)
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
[_session sleepInContext:context_];
|
||||
NSDebugMLLog(@"sessions",@"_session=%@",_session);
|
||||
|
@ -1785,7 +1832,15 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
[context_ _setSession:nil];
|
||||
NSDebugMLLog(@"sessions",@"_session=%@",_session);
|
||||
NSDebugMLLog(@"sessions",@"sessionStore=%@",sessionStore);
|
||||
};
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
localException=ExceptionByAddingUserInfoObjectFrameInfo0(localException,@"In _saveSessionForContext:");
|
||||
LOGException(@"%@ (%@)",localException,[localException reason]);
|
||||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
|
@ -4002,6 +4057,19 @@ int GSWApplicationMain(NSString* applicationClassName,
|
|||
forKey:GSWOPT_DebugSetConfigFilePath];
|
||||
};
|
||||
|
||||
/** Returns the path where to store responses or nil if responses are not saved **/
|
||||
+(NSString*)saveResponsesPath
|
||||
{
|
||||
return [[NSUserDefaults standardUserDefaults] objectForKey:GSWOPT_SaveResponsesPath[GSWebNamingConv]];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
+(void)setSaveResponsesPath:(NSString*)saveResponsesPath
|
||||
{
|
||||
[[NSUserDefaults standardUserDefaults] setObject:saveResponsesPath
|
||||
forKey:GSWOPT_SaveResponsesPath[GSWebNamingConv]];
|
||||
};
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWAssociation.h - GSWeb: Class GSWAssociation
|
||||
/** GSWAssociation.h - <title>GSWeb: Class GSWAssociation</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Date: Jan 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
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 +24,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$
|
||||
|
||||
|
@ -56,21 +62,21 @@ In the case value = myMember.label, value came from method "label" or member "la
|
|||
//====================================================================
|
||||
@interface GSWAssociation : NSObject <NSCopying>
|
||||
{
|
||||
BOOL debugEnabled;
|
||||
NSString* bindingName;
|
||||
NSString* declarationName;
|
||||
NSString* declarationType;
|
||||
BOOL _debugEnabled;
|
||||
NSString* _bindingName;
|
||||
NSString* _declarationName;
|
||||
NSString* _declarationType;
|
||||
};
|
||||
|
||||
-(id)init;
|
||||
-(id)copyWithZone:(NSZone *)zone;
|
||||
|
||||
-(id)valueInComponent:(GSWComponent*)component_;
|
||||
-(id)valueInObject:(id)object_;//NDFN
|
||||
-(void)setValue:(id)value_
|
||||
inComponent:(GSWComponent*)component_;
|
||||
-(void)setValue:(id)value_
|
||||
inObject:(id)object_;//NDFN
|
||||
-(id)valueInComponent:(GSWComponent*)component;
|
||||
-(id)valueInObject:(id)object;//NDFN
|
||||
-(void)setValue:(id)value
|
||||
inComponent:(GSWComponent*)component;
|
||||
-(void)setValue:(id)value
|
||||
inObject:(id)object;//NDFN
|
||||
-(BOOL)isValueConstant;
|
||||
-(BOOL)isValueSettable;
|
||||
-(NSString*)description;
|
||||
|
@ -81,24 +87,24 @@ In the case value = myMember.label, value came from method "label" or member "la
|
|||
|
||||
//====================================================================
|
||||
@interface GSWAssociation (GSWAssociationHandlers)
|
||||
+(void)setClasse:(Class)class_
|
||||
forHandler:(NSString*)handler_;
|
||||
+(void)addLogHandlerClasse:(Class)class_;
|
||||
+(void)removeLogHandlerClasse:(Class)class_;
|
||||
+(void)setClasse:(Class)class
|
||||
forHandler:(NSString*)handler;
|
||||
+(void)addLogHandlerClasse:(Class)class;
|
||||
+(void)removeLogHandlerClasse:(Class)class;
|
||||
@end
|
||||
//====================================================================
|
||||
@interface GSWAssociation (GSWAssociationCreation)
|
||||
+(GSWAssociation*)associationWithValue:(id)value_;
|
||||
+(GSWAssociation*)associationWithKeyPath:(NSString*)keyPath_;
|
||||
+(GSWAssociation*)associationWithValue:(id)value;
|
||||
+(GSWAssociation*)associationWithKeyPath:(NSString*)keyPath;
|
||||
//NDFN
|
||||
+(GSWAssociation*)associationFromString:(NSString*)string_;
|
||||
+(GSWAssociation*)associationFromString:(NSString*)string;
|
||||
|
||||
@end
|
||||
/*
|
||||
//====================================================================
|
||||
@interface GSWAssociation (GSWAssociationOldFn)
|
||||
|
||||
-(void)setValue:(id)value_;
|
||||
-(void)setValue:(id)value;
|
||||
-(id)value;
|
||||
|
||||
@end
|
||||
|
@ -106,7 +112,7 @@ In the case value = myMember.label, value came from method "label" or member "la
|
|||
//====================================================================
|
||||
@interface GSWAssociation (GSWAssociationA)
|
||||
|
||||
-(BOOL)isImplementedForComponent:(NSObject*)component_;
|
||||
-(BOOL)isImplementedForComponent:(NSObject*)component;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -114,35 +120,35 @@ In the case value = myMember.label, value came from method "label" or member "la
|
|||
@interface GSWAssociation (GSWAssociationB)
|
||||
|
||||
-(NSString*)keyPath;
|
||||
-(void)logSynchronizeComponentToParentForValue:(id)value_
|
||||
inComponent:(NSObject*)component_;
|
||||
-(void)logSynchronizeParentToComponentForValue:(id)value_
|
||||
inComponent:(NSObject*)component_;
|
||||
-(void)logTakeValue:(id)value_;
|
||||
-(void)logSetValue:(id)value_;
|
||||
-(void)logSynchronizeComponentToParentForValue:(id)value
|
||||
inComponent:(NSObject*)component;
|
||||
-(void)logSynchronizeParentToComponentForValue:(id)value
|
||||
inComponent:(NSObject*)component;
|
||||
-(void)logTakeValue:(id)value;
|
||||
-(void)logSetValue:(id)value;
|
||||
|
||||
-(NSString*)debugDescription;
|
||||
-(void)setDebugEnabledForBinding:(NSString*)_bindingName
|
||||
declarationName:(NSString*)_declarationName
|
||||
declarationType:(NSString*)_declarationType;
|
||||
-(void)setDebugEnabledForBinding:(NSString*)bindingName
|
||||
declarationName:(NSString*)declarationName
|
||||
declarationType:(NSString*)declarationType;
|
||||
|
||||
+(id)valueInObject:(id)object_
|
||||
forKeyPath:(NSString*)keyPath_;
|
||||
+(id)valueInObject:(id)object
|
||||
forKeyPath:(NSString*)keyPath;
|
||||
|
||||
+(void)setValue:(id)value_
|
||||
inObject:(id)object_
|
||||
forKeyPath:(NSString*)keyPath_;
|
||||
+(void)setValue:(id)value
|
||||
inObject:(id)object
|
||||
forKeyPath:(NSString*)keyPath;
|
||||
|
||||
@end
|
||||
|
||||
//===================================================================================
|
||||
@interface NSDictionary (GSWAssociation)
|
||||
-(BOOL)isAssociationDebugEnabledInComponent:(NSObject*)component_;
|
||||
-(BOOL)isAssociationDebugEnabledInComponent:(NSObject*)component;
|
||||
-(void)associationsSetDebugEnabled;
|
||||
-(void)associationsSetValuesFromObject:(id)from_
|
||||
inObject:(id)to_;
|
||||
-(NSDictionary*)associationsWithoutPrefix:(NSString*)prefix_
|
||||
removeFrom:(NSMutableDictionary*)removeFrom_;
|
||||
-(void)associationsSetValuesFromObject:(id)from
|
||||
inObject:(id)to;
|
||||
-(NSDictionary*)associationsWithoutPrefix:(NSString*)prefix
|
||||
removeFrom:(NSMutableDictionary*)removeFrom;
|
||||
-(NSDictionary*)dictionaryByReplacingStringsWithAssociations;
|
||||
@end
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,11 +1,17 @@
|
|||
/* GSWComponent.h - GSWeb: Class GSWComponent
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWComponent.h - <title>GSWeb: Class GSWComponent</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$
|
||||
|
||||
|
@ -30,43 +37,43 @@
|
|||
@interface GSWComponent : GSWElement <NSCoding,NSCopying>
|
||||
{
|
||||
//TODO ==> private @private
|
||||
NSString* name;
|
||||
NSMutableDictionary* subComponents;
|
||||
NSString* templateName;
|
||||
GSWElement* template;
|
||||
GSWComponentDefinition* componentDefinition;
|
||||
GSWComponent* parent;
|
||||
NSArray* associationsKeys;
|
||||
NSArray* associations;
|
||||
GSWElement* childTemplate;
|
||||
GSWContext* context;
|
||||
GSWSession* session;
|
||||
NSString* _name;
|
||||
NSMutableDictionary* _subComponents;
|
||||
NSString* _templateName;
|
||||
GSWElement* _template;
|
||||
GSWComponentDefinition* _componentDefinition;
|
||||
GSWComponent* _parent;
|
||||
NSArray* _associationsKeys;
|
||||
NSArray* _associations;
|
||||
GSWElement* _childTemplate;
|
||||
GSWContext* _context;
|
||||
GSWSession* _session;
|
||||
//GSWeb Additions {
|
||||
NSDictionary* userDictionary;
|
||||
NSDictionary* userAssociations;
|
||||
NSDictionary* defaultAssociations;
|
||||
NSMutableDictionary* validationFailureMessages;
|
||||
NSDictionary* _userDictionary;
|
||||
NSDictionary* _userAssociations;
|
||||
NSDictionary* _defaultAssociations;
|
||||
NSMutableDictionary* _validationFailureMessages;
|
||||
// }
|
||||
BOOL isPage;
|
||||
BOOL isCachingEnabled;
|
||||
BOOL isSynchronized;
|
||||
BOOL _isPage;
|
||||
BOOL _isCachingEnabled;
|
||||
BOOL _isSynchronized;
|
||||
};
|
||||
|
||||
-(id)init;
|
||||
-(void)dealloc;
|
||||
|
||||
-(id)initWithCoder:(NSCoder*)coder_;
|
||||
-(void)encodeWithCoder:(NSCoder*)coder_;
|
||||
-(id)initWithCoder:(NSCoder*)coder;
|
||||
-(void)encodeWithCoder:(NSCoder*)coder;
|
||||
-(id)copyWithZone:(NSZone*)zone;
|
||||
|
||||
-(NSString*)description;
|
||||
#if !GSWEB_STRICT
|
||||
-(NSDictionary*)userDictionary;
|
||||
-(void)setUserDictionary:(NSDictionary*)userDictionary_;
|
||||
-(void)setUserDictionary:(NSDictionary*)userDictionary;
|
||||
-(NSDictionary*)userAssociations;
|
||||
-(void)setUserAssociations:(NSDictionary*)userAssociations_;
|
||||
-(void)setUserAssociations:(NSDictionary*)userAssociations;
|
||||
-(NSDictionary*)defaultAssociations;
|
||||
-(void)setDefaultAssociations:(NSDictionary*)defaultAssociations_;
|
||||
-(void)setDefaultAssociations:(NSDictionary*)defaultAssociations;
|
||||
#endif
|
||||
-(NSString*)frameworkName;
|
||||
-(NSString*)baseURL;
|
||||
|
@ -81,17 +88,17 @@
|
|||
@interface GSWComponent (GSWCachingPolicy)
|
||||
|
||||
-(BOOL)isCachingEnabled;
|
||||
-(void)setCachingEnabled:(BOOL)flag_;
|
||||
-(void)setCachingEnabled:(BOOL)flag;
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWComponent (GSWComponentA)
|
||||
|
||||
-(void)setParent:(GSWComponent*)_parent
|
||||
associationsKeys:(NSArray*)_associationsKeys
|
||||
associations:(NSArray*)_associations
|
||||
template:(GSWElement*)_template;
|
||||
-(void)setParent:(GSWComponent*)parent
|
||||
associationsKeys:(NSArray*)associationsKeys
|
||||
associations:(NSArray*)associations
|
||||
template:(GSWElement*)template;
|
||||
|
||||
-(void)synchronizeComponentToParent;
|
||||
-(void)synchronizeParentToComponent;
|
||||
|
@ -99,58 +106,59 @@ associationsKeys:(NSArray*)_associationsKeys
|
|||
-(GSWElement*)_template;
|
||||
-(GSWComponentDefinition*)_componentDefinition;
|
||||
-(NSString*)_templateName;
|
||||
-(NSString*)definitionName;
|
||||
-(BOOL)_isPage;
|
||||
-(void)_setIsPage:(BOOL)_isPage;
|
||||
-(void)_setContext:(GSWContext*)context_;
|
||||
-(void)_setIsPage:(BOOL)isPage;
|
||||
-(void)_setContext:(GSWContext*)aContext;
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWComponent (GSWResourceManagement)
|
||||
|
||||
-(GSWElement*)templateWithName:(NSString*)name_;
|
||||
-(GSWElement*)templateWithName:(NSString*)aName;
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWComponent (GSWComponentC)
|
||||
-(GSWComponent*)subComponentForElementID:(NSString*)_elementId;
|
||||
-(void)setSubComponent:(GSWComponent*)_component
|
||||
forElementID:(NSString*)_elementId;
|
||||
-(GSWComponent*)subComponentForElementID:(NSString*)elementId;
|
||||
-(void)setSubComponent:(GSWComponent*)component
|
||||
forElementID:(NSString*)elementId;
|
||||
|
||||
//NDFN
|
||||
-(void)makeParentsPerformSelectorIfPossible:(SEL)aSelector;
|
||||
-(void)makeParentsPerformSelectorIfPossible:(SEL)aSelector
|
||||
withObject:(id)object_;
|
||||
withObject:(id)object;
|
||||
-(void)makeParentsPerformSelectorIfPossible:(SEL)aSelector
|
||||
withObject:(id)object1_
|
||||
withObject:(id)object2_;
|
||||
withObject:(id)object1
|
||||
withObject:(id)object2;
|
||||
-(id)makeAParentPerformSelectorIfPossible:(SEL)aSelector;
|
||||
-(id)makeAParentPerformSelectorIfPossible:(SEL)aSelector
|
||||
withObject:(id)object_;
|
||||
withObject:(id)object;
|
||||
-(id)makeAParentPerformSelectorIfPossible:(SEL)aSelector
|
||||
withObject:(id)object1_
|
||||
withObject:(id)object2_;
|
||||
withObject:(id)object1
|
||||
withObject:(id)object2;
|
||||
-(void)makeSubComponentsPerformSelectorIfPossible:(SEL)aSelector;
|
||||
-(void)makeSubComponentsPerformSelectorIfPossible:(SEL)aSelector
|
||||
withObject:(id)object_;
|
||||
withObject:(id)object;
|
||||
-(void)makeSubComponentsPerformSelectorIfPossible:(SEL)aSelector
|
||||
withObject:(id)object1_
|
||||
withObject:(id)object2_;
|
||||
withObject:(id)object1
|
||||
withObject:(id)object2;
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWComponent (GSWComponentD)
|
||||
-(GSWAssociation*)_associationWithName:(NSString*)parentBindingName_;
|
||||
-(GSWAssociation*)_associationWithName:(NSString*)parentBindingName;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWComponent (GSWSynchronizing)
|
||||
-(BOOL)hasBinding:(NSString*)parentBindingName_;
|
||||
-(void)setValue:(id)_value
|
||||
forBinding:(NSString*)parentBindingName_;
|
||||
-(id)valueForBinding:(NSString*)parentBindingName_;
|
||||
-(BOOL)hasBinding:(NSString*)parentBindingName;
|
||||
-(void)setValue:(id)value
|
||||
forBinding:(NSString*)parentBindingName;
|
||||
-(id)valueForBinding:(NSString*)parentBindingName;
|
||||
-(BOOL)synchronizesVariablesWithBindings;
|
||||
-(NSDictionary*)bindingAssociations;
|
||||
@end
|
||||
|
@ -158,25 +166,25 @@ associationsKeys:(NSArray*)_associationsKeys
|
|||
//====================================================================
|
||||
@interface GSWComponent (GSWRequestHandling)
|
||||
-(void)sleep;
|
||||
-(void)sleepInContext:(GSWContext*)context_;
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(void)sleepInContext:(GSWContext*)aContext;
|
||||
-(void)appendToResponse:(GSWResponse*)aResponse
|
||||
inContext:(GSWContext*)aContext;
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)aRequest
|
||||
inContext:(GSWContext*)aContext;
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)aContext;
|
||||
#if !GSWEB_STRICT
|
||||
-(void)setValidationFailureMessage:(NSString*)message
|
||||
forElement:(GSWDynamicElement*)element_;
|
||||
-(NSString*)validationFailureMessageForElement:(GSWDynamicElement*)element_;
|
||||
forElement:(GSWDynamicElement*)element;
|
||||
-(NSString*)validationFailureMessageForElement:(GSWDynamicElement*)element;
|
||||
-(NSString*)handleValidationExceptionDefault;
|
||||
-(BOOL)isValidationFailure;
|
||||
-(NSDictionary*)validationFailureMessages;
|
||||
-(NSArray*)allValidationFailureMessages;
|
||||
#endif
|
||||
-(void)ensureAwakeInContext:(GSWContext*)context_;
|
||||
-(void)ensureAwakeInContext:(GSWContext*)aContext;
|
||||
-(void)awake;
|
||||
-(void)awakeInContext:(GSWContext*)context_;
|
||||
-(void)awakeInContext:(GSWContext*)aContext;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -191,7 +199,7 @@ associationsKeys:(NSArray*)_associationsKeys
|
|||
|
||||
//====================================================================
|
||||
@interface GSWComponent (GSWConveniences)
|
||||
-(GSWComponent*)pageWithName:(NSString*)_name;
|
||||
-(GSWComponent*)pageWithName:(NSString*)aName;
|
||||
-(GSWSession*)session;
|
||||
-(BOOL)hasSession;
|
||||
-(GSWContext*)context;
|
||||
|
@ -201,15 +209,15 @@ associationsKeys:(NSArray*)_associationsKeys
|
|||
|
||||
//====================================================================
|
||||
@interface GSWComponent (GSWLogging)
|
||||
-(void)validationFailedWithException:(NSException*)_exception
|
||||
value:(id)_value
|
||||
keyPath:(id)_keyPath;
|
||||
-(void)_debugWithString:(NSString*)_string;
|
||||
-(void)debugWithFormat:(NSString*)_format,...;
|
||||
-(void)logWithFormat:(NSString*)_format,...;
|
||||
-(void)logWithFormat:(NSString*)_format
|
||||
arguments:(va_list)argList;
|
||||
+(void)logWithFormat:(NSString*)_format,...;
|
||||
-(void)validationFailedWithException:(NSException*)exception
|
||||
value:(id)_value
|
||||
keyPath:(id)_keyPath;
|
||||
-(void)_debugWithString:(NSString*)string;
|
||||
-(void)debugWithFormat:(NSString*)format,...;
|
||||
-(void)logWithFormat:(NSString*)format,...;
|
||||
-(void)logWithFormat:(NSString*)format
|
||||
arguments:(va_list)argList;
|
||||
+(void)logWithFormat:(NSString*)format,...;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -220,72 +228,72 @@ associationsKeys:(NSArray*)_associationsKeys
|
|||
|
||||
//====================================================================
|
||||
@interface GSWComponent (GSWComponentK)
|
||||
-(GSWResponse*)_generateResponseInContext:(GSWContext*)context_;
|
||||
-(id)validateValue:(id*)valuePtr_
|
||||
forKey:(id)key_;
|
||||
+(id)validateValue:(id*)valuePtr_
|
||||
forKey:(id)key_;
|
||||
-(GSWResponse*)_generateResponseInContext:(GSWContext*)aContext;
|
||||
-(id)validateValue:(id*)valuePtr
|
||||
forKey:(id)key;
|
||||
+(id)validateValue:(id*)valuePtr
|
||||
forKey:(id)key;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWComponent (GSWComponentL)
|
||||
-(NSString*)stringForKey:(id)key_
|
||||
inTableNamed:(NSString*)name_
|
||||
withDefaultValue:(NSString*)defaultValue_;
|
||||
-(NSString*)stringForKey:(id)key
|
||||
inTableNamed:(NSString*)aName
|
||||
withDefaultValue:(NSString*)defaultValue;
|
||||
//NDFN
|
||||
-(NSDictionary*)stringsTableNamed:(NSString*)name_;
|
||||
-(NSDictionary*)stringsTableNamed:(NSString*)aName;
|
||||
|
||||
//NDFN
|
||||
-(NSArray*)stringsTableArrayNamed:(NSString*)name_;
|
||||
-(NSArray*)stringsTableArrayNamed:(NSString*)aName;
|
||||
|
||||
-(NSString*)urlForResourceNamed:(NSString*)name_
|
||||
ofType:(NSString*)extension_;
|
||||
-(NSString*)_urlForResourceNamed:(NSString*)name_
|
||||
ofType:(NSString*)extension_;
|
||||
-(NSString*)pathForResourceNamed:(NSString*)name_
|
||||
ofType:(NSString*)extension_;
|
||||
-(NSString*)urlForResourceNamed:(NSString*)aName
|
||||
ofType:(NSString*)extension;
|
||||
-(NSString*)_urlForResourceNamed:(NSString*)aName
|
||||
ofType:(NSString*)extension;
|
||||
-(NSString*)pathForResourceNamed:(NSString*)aName
|
||||
ofType:(NSString*)extension;
|
||||
//NDFN
|
||||
-(NSString*)pathForComponentResourceNamed:(NSString*)name_
|
||||
ofType:(NSString*)type_;
|
||||
-(NSString*)pathForComponentResourceNamed:(NSString*)aName
|
||||
ofType:(NSString*)type;
|
||||
|
||||
|
||||
//NDFN
|
||||
-(NSString*)stringForKey:(id)key_
|
||||
inTableNamed:(NSString*)name_
|
||||
withDefaultValue:(NSString*)defaultValue_
|
||||
inFramework:(NSString*)frameworkName_;
|
||||
-(NSString*)stringForKey:(id)key
|
||||
inTableNamed:(NSString*)aName
|
||||
withDefaultValue:(NSString*)defaultValue
|
||||
inFramework:(NSString*)frameworkName;
|
||||
|
||||
//NDFN
|
||||
-(NSDictionary*)stringsTableNamed:(NSString*)name_
|
||||
inFramework:(NSString*)frameworkName_;
|
||||
-(NSDictionary*)stringsTableNamed:(NSString*)aName
|
||||
inFramework:(NSString*)frameworkName;
|
||||
|
||||
//NDFN
|
||||
-(NSArray*)stringsTableArrayNamed:(NSString*)name_
|
||||
inFramework:(NSString*)frameworkName_;
|
||||
-(NSArray*)stringsTableArrayNamed:(NSString*)aName
|
||||
inFramework:(NSString*)frameworkName;
|
||||
|
||||
//NDFN
|
||||
-(NSString*)urlForResourceNamed:(NSString*)name_
|
||||
ofType:(NSString*)extension_
|
||||
inFramework:(NSString*)frameworkName_;
|
||||
-(NSString*)urlForResourceNamed:(NSString*)aName
|
||||
ofType:(NSString*)extension
|
||||
inFramework:(NSString*)frameworkName;
|
||||
|
||||
//NDFN
|
||||
-(NSString*)pathForResourceNamed:(NSString*)name_
|
||||
ofType:(NSString*)extension_
|
||||
inFramework:(NSString*)frameworkName_;
|
||||
-(NSString*)pathForResourceNamed:(NSString*)aName
|
||||
ofType:(NSString*)extension
|
||||
inFramework:(NSString*)frameworkName;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWComponent (GSWTemplateParsing)
|
||||
|
||||
+(GSWElement*)templateWithHTMLString:(NSString *)htmlString_
|
||||
declarationString:(NSString *)declarationString_
|
||||
languages:(NSArray*)languages_;
|
||||
+(GSWElement*)templateWithHTMLString:(NSString*)htmlString
|
||||
declarationString:(NSString*)declarationString
|
||||
languages:(NSArray*)languages;
|
||||
|
||||
@end
|
||||
//====================================================================
|
||||
@interface GSWComponent (GSWTemplateParsingOldFn)
|
||||
+(GSWElement*)templateWithHTMLString:(NSString *)htmlString_
|
||||
declarationString:(NSString*)declarationString_;//old
|
||||
+(GSWElement*)templateWithHTMLString:(NSString *)htmlString
|
||||
declarationString:(NSString*)declarationString;//old
|
||||
|
||||
@end
|
||||
|
||||
|
@ -298,13 +306,13 @@ associationsKeys:(NSArray*)_associationsKeys
|
|||
|
||||
//====================================================================
|
||||
@interface GSWComponent (GSWStatistics)
|
||||
-(NSString*)descriptionForResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(NSString*)descriptionForResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)aContext;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@interface GSWComponent (GSWComponentClassA)
|
||||
+(void)_registerObserver:(id)_observer;
|
||||
+(void)_registerObserver:(id)observer;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -53,5 +53,6 @@
|
|||
#define GSWOPTVALUE_WorkerThreadCount @"8"
|
||||
#define GSWOPTVALUE_MultiThreadEnabled @"YES"
|
||||
#define GSWOPTVALUE_AdaptorHost @""
|
||||
#define GSWOPTVALUE_SaveResponsesPath nil
|
||||
|
||||
#endif // _GSWebConfig_h__
|
||||
|
|
|
@ -61,10 +61,11 @@ static char rcsId[] = "$Id$";
|
|||
//--------------------------------------------------------------------
|
||||
-(NSString*)debugDescription
|
||||
{
|
||||
NSString* _dscr=[NSString stringWithFormat:@"<%s %p - value=%@",
|
||||
object_get_class_name(self),
|
||||
(void*)self,
|
||||
value];
|
||||
NSString* _dscr=[NSString stringWithFormat:@"<%s %p - value=%@ (class: %@)>",
|
||||
object_get_class_name(self),
|
||||
(void*)self,
|
||||
value,
|
||||
[value class]];
|
||||
return _dscr;
|
||||
};
|
||||
|
||||
|
@ -103,10 +104,11 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
GSWLogAssertGood(value);
|
||||
};
|
||||
_dscr=[NSString stringWithFormat:@"<%s %p - value=%@",
|
||||
object_get_class_name(self),
|
||||
(void*)self,
|
||||
value];
|
||||
_dscr=[NSString stringWithFormat:@"<%s %p - value=%@ (class: %@)>",
|
||||
object_get_class_name(self),
|
||||
(void*)self,
|
||||
value,
|
||||
[value class]];
|
||||
return _dscr;
|
||||
};
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@ extern NSString* GSWOPT_ProjectSearchPath;
|
|||
extern NSString* GSWOPT_MultiThreadEnabled;
|
||||
extern NSString* GSWOPT_DebugSetConfigFilePath;
|
||||
extern NSString* GSWOPT_AdaptorHost[2];
|
||||
|
||||
extern NSString* GSWOPT_SaveResponsesPath[2];
|
||||
|
||||
//====================================================================
|
||||
// Cache Marker
|
||||
|
|
|
@ -185,6 +185,7 @@ NSString* GSWOPT_ProjectSearchPath=@"NSProjectSearchPath";
|
|||
NSString* GSWOPT_MultiThreadEnabled=@"GSWMTEnabled";
|
||||
NSString* GSWOPT_DebugSetConfigFilePath=@"GSWDebugSetConfigFilePath";
|
||||
NSString* GSWOPT_AdaptorHost[2]={ @"GSWAdaptorHost", @"WOAdaptorHost" };
|
||||
NSString* GSWOPT_SaveResponsesPath[2]={ @"GSWSaveResponsePath", @"WOSaveResponsePath" };
|
||||
|
||||
//====================================================================
|
||||
// Cache Marker
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
|
||||
-(void)setInForm:(BOOL)_flag;
|
||||
-(BOOL)isInForm;
|
||||
-(NSString*)elementID;
|
||||
-(GSWElementIDString*)elementID;
|
||||
-(GSWComponent*)component;
|
||||
-(GSWComponent*)page;
|
||||
-(GSWResponse*)response;
|
||||
|
|
|
@ -181,7 +181,7 @@ static int dontTraceComponentActionURL=0;
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// elementID
|
||||
-(NSString*)elementID
|
||||
-(GSWElementIDString*)elementID
|
||||
{
|
||||
return elementID;
|
||||
};
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
NSDate* _runDate;
|
||||
NSDate* _dispatchRequestDate;
|
||||
NSDate* _sendResponseDate;
|
||||
NSString* _remoteAddress;
|
||||
int _requestNamingConv;//GSWNAMES_INDEX or WONAMES_INDEX
|
||||
}
|
||||
|
||||
|
@ -74,11 +75,16 @@
|
|||
|
||||
+(void)sendResponse:(GSWResponse*)response
|
||||
toStream:(NSFileHandle*)aStream
|
||||
withNamingConv:(int)requestNamingConv;
|
||||
withNamingConv:(int)requestNamingConv
|
||||
withAdditionalHeaderLines:(NSArray*)addHeaders
|
||||
withRemoteAddress:(NSString*)remoteAddress;
|
||||
|
||||
+(void)sendRetryLasterResponseToStream:(NSFileHandle*)stream;
|
||||
+(void)sendConnectionRefusedResponseToStream:(NSFileHandle*)stream
|
||||
withMessage:(NSString*)message;
|
||||
+(void)saveResponse:(GSWResponse*)response
|
||||
data:(NSData*)allResponseData
|
||||
remoteAddress:(NSString*)remoteAddress;
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
|
@ -77,6 +77,7 @@ static char rcsId[] = "$Id$";
|
|||
DESTROY(_runDate);
|
||||
DESTROY(_dispatchRequestDate);
|
||||
DESTROY(_sendResponseDate);
|
||||
DESTROY(_remoteAddress);
|
||||
GSWLogMemC("release pool");
|
||||
// DESTROY(_pool);
|
||||
GSWLogMemC("super dealloc");
|
||||
|
@ -520,6 +521,7 @@ static char rcsId[] = "$Id$";
|
|||
};
|
||||
};
|
||||
} while (!isAllDataReaden && !isElapsed);
|
||||
ASSIGN(_remoteAddress,remoteAddr);
|
||||
NSDebugDeepMLog(@"GSWDefaultAdaptor: userAgent=%@ remoteAddr=%@ isAllDataReaden=%s isElapsed=%s readenBytesNb=%d contentLength=%d dataBytesNb=%d headersBytesNb=%d",
|
||||
userAgent,
|
||||
remoteAddr,
|
||||
|
@ -604,10 +606,48 @@ static char rcsId[] = "$Id$";
|
|||
/** Send response 'response' to current stream using current naming convention **/
|
||||
-(void)sendResponse:(GSWResponse*)response
|
||||
{
|
||||
NSMutableArray* headers=nil;
|
||||
NSString* anHeader=nil;
|
||||
NSTimeInterval ti=0;
|
||||
LOGObjectFnStart();
|
||||
|
||||
#ifndef NDEBUG
|
||||
headers=[NSMutableArray array];
|
||||
anHeader=[NSString stringWithFormat:@"GSWRunDate: %@\n",
|
||||
[_runDate descriptionWithCalendarFormat:@"%d/%m/%Y %H:%M:%S.%F"
|
||||
timeZone:nil
|
||||
locale:nil]];
|
||||
[headers addObject:anHeader];
|
||||
anHeader=[NSString stringWithFormat:@"GSWDispatchRequestDate: %@\n",
|
||||
[_dispatchRequestDate descriptionWithCalendarFormat:@"%d/%m/%Y %H:%M:%S.%F"
|
||||
timeZone:nil
|
||||
locale:nil]];
|
||||
[headers addObject:anHeader];
|
||||
anHeader=[NSString stringWithFormat:@"GSWSendResponseDate: %@\n",
|
||||
[_sendResponseDate descriptionWithCalendarFormat:@"%d/%m/%Y %H:%M:%S.%F"
|
||||
timeZone:nil
|
||||
locale:nil]];
|
||||
[headers addObject:anHeader];
|
||||
|
||||
ti=[_dispatchRequestDate timeIntervalSinceDate:_runDate];
|
||||
anHeader=[NSString stringWithFormat:@"GSWDispatchRequestDate-GSWRunDate: %.3f seconds (%.1f minutes)\n",
|
||||
ti,(double)(ti/60)];
|
||||
|
||||
[headers addObject:anHeader];
|
||||
ti=[_sendResponseDate timeIntervalSinceDate:_runDate];
|
||||
anHeader=[NSString stringWithFormat:@"GSWSendResponseDate-GSWRunDate: %.3f seconds (%.1f minutes)\n",
|
||||
ti,(double)(ti/60)];
|
||||
[headers addObject:anHeader];
|
||||
ti=[_sendResponseDate timeIntervalSinceDate:_dispatchRequestDate];
|
||||
anHeader=[NSString stringWithFormat:@"GSWSendResponseDate-GSWDispatchRequestDate: %.3f seconds (%.1f minutes)\n",
|
||||
ti,(double)(ti/60)];
|
||||
[headers addObject:anHeader];
|
||||
#endif
|
||||
[[self class]sendResponse:response
|
||||
toStream:_stream
|
||||
withNamingConv:_requestNamingConv];
|
||||
withNamingConv:_requestNamingConv
|
||||
withAdditionalHeaderLines:headers
|
||||
withRemoteAddress:_remoteAddress];
|
||||
ASSIGN(_stream,nil);
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
@ -618,6 +658,8 @@ Note: the stream is closed at the end of the write
|
|||
+(void)sendResponse:(GSWResponse*)response
|
||||
toStream:(NSFileHandle*)aStream
|
||||
withNamingConv:(int)requestNamingConv
|
||||
withAdditionalHeaderLines:(NSArray*)addHeaders
|
||||
withRemoteAddress:(NSString*)remoteAddress
|
||||
{
|
||||
BOOL ok=YES;
|
||||
LOGObjectFnStart();
|
||||
|
@ -627,7 +669,8 @@ Note: the stream is closed at the end of the write
|
|||
{
|
||||
int headerN=0;
|
||||
int headerNForKey=0;
|
||||
NSMutableData* responseData=[[NSMutableData new]autorelease];
|
||||
NSMutableData* allResponseData=nil;//to store response
|
||||
NSMutableData* responseData=(NSMutableData*)[NSMutableData data];
|
||||
NSArray* headerKeys=[response headerKeys];
|
||||
NSArray* headersForKey=nil;
|
||||
NSString* key=nil;
|
||||
|
@ -638,6 +681,10 @@ Note: the stream is closed at the end of the write
|
|||
GSWHTTPHeader_Response_OK,
|
||||
GSWHTTPHeader_Response_HeaderLineEnd[requestNamingConv]];
|
||||
NSString* empty=[NSString stringWithString:@"\n"];
|
||||
NSDebugDeepMLLog(@"low",@"[GSWApplication saveResponsesPath]:%@",[GSWApplication saveResponsesPath]);
|
||||
if ([GSWApplication saveResponsesPath])
|
||||
allResponseData=(NSMutableData*)[NSMutableData data];
|
||||
|
||||
NSDebugDeepMLLog(@"low",@"head:%@",head);
|
||||
NSDebugDeepMLLog(@"low",@"responseData:%@",responseData);
|
||||
[responseData appendData:[head dataUsingEncoding:NSASCIIStringEncoding]];
|
||||
|
@ -656,6 +703,9 @@ Note: the stream is closed at the end of the write
|
|||
NSDebugDeepMLLog(@"low",@"responseData:%@",responseData);
|
||||
};
|
||||
};
|
||||
for(headerN=0;headerN<[addHeaders count];headerN++)
|
||||
[responseData appendData:[[addHeaders objectAtIndex:headerN]dataUsingEncoding:NSASCIIStringEncoding]];
|
||||
|
||||
// NSDebugDeepMLLog(@"low",@"cl:%@",cl);
|
||||
NSDebugDeepMLLog(@"low",@"empty:%@",empty);
|
||||
// [responseData appendData:[cl dataUsingEncoding:NSASCIIStringEncoding]];
|
||||
|
@ -663,6 +713,7 @@ Note: the stream is closed at the end of the write
|
|||
[responseData appendData:[empty dataUsingEncoding:NSASCIIStringEncoding]];
|
||||
NSDebugDeepMLLog(@"low",@"responseData:%@",responseData);
|
||||
|
||||
[allResponseData appendData:responseData];
|
||||
NS_DURING
|
||||
{
|
||||
[aStream writeData:responseData];
|
||||
|
@ -670,8 +721,11 @@ Note: the stream is closed at the end of the write
|
|||
NS_HANDLER
|
||||
{
|
||||
ok=NO;
|
||||
LOGException(@"GSWDefaultAdaptorThread: readRequestFromStream Exception:%@ (%@)",
|
||||
LOGException(@"GSWDefaultAdaptorThread: sendResponse Exception:%@ (%@)",
|
||||
localException,[localException reason]);
|
||||
NSDebugMLog(@"EXCEPTION GSWDefaultAdaptorThread: sendResponse Exception:%@ (%@)",
|
||||
localException,[localException reason]);
|
||||
[GSWApplication statusLogWithFormat:@"\nException while sending response\n"];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
if (ok && [[response content] length]>0)
|
||||
|
@ -689,18 +743,29 @@ Note: the stream is closed at the end of the write
|
|||
[[[NSString alloc] initWithData:[response content]
|
||||
encoding:NSISOLatin1StringEncoding]
|
||||
autorelease]);
|
||||
|
||||
[allResponseData appendData:responseData];
|
||||
NS_DURING
|
||||
{
|
||||
[aStream writeData:responseData];
|
||||
[GSWApplication statusLogWithFormat:@"\nResponse Sent\n"];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
ok=NO;
|
||||
LOGException(@"GSWDefaultAdaptorThread: readRequestFromStream Exception:%@ (%@)",localException,[localException reason]);
|
||||
LOGException(@"GSWDefaultAdaptorThread: sendResponse Exception:%@ (%@)",
|
||||
localException,[localException reason]);
|
||||
NSDebugMLog(@"EXCEPTION GSWDefaultAdaptorThread: sendResponse Exception:%@ (%@)",
|
||||
localException,[localException reason]);
|
||||
[GSWApplication statusLogWithFormat:@"\nException while sending response\n"];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
NSDebugDeepMLLog0(@"info",@"Response content Written");
|
||||
};
|
||||
if (allResponseData)
|
||||
[self saveResponse:response
|
||||
data:allResponseData
|
||||
remoteAddress:remoteAddress];
|
||||
};
|
||||
[aStream closeFile];
|
||||
LOGObjectFnStop();
|
||||
|
@ -743,7 +808,9 @@ Note: the stream is closed at the end of the write
|
|||
NSDebugDeepMLog0(@"sendResponse:\n");
|
||||
[self sendResponse:response
|
||||
toStream:stream
|
||||
withNamingConv:GSWNAMES_INDEX];
|
||||
withNamingConv:GSWNAMES_INDEX
|
||||
withAdditionalHeaderLines:nil
|
||||
withRemoteAddress:nil];
|
||||
LOGDEEPClassFnStop();
|
||||
DESTROY(pool);
|
||||
};
|
||||
|
@ -763,10 +830,53 @@ Note: the stream is closed at the end of the write
|
|||
NSDebugDeepMLog0(@"sendResponse:\n");
|
||||
[self sendResponse:response
|
||||
toStream:stream
|
||||
withNamingConv:GSWNAMES_INDEX];
|
||||
withNamingConv:GSWNAMES_INDEX
|
||||
withAdditionalHeaderLines:nil
|
||||
withRemoteAddress:nil];
|
||||
LOGDEEPClassFnStop();
|
||||
DESTROY(pool);
|
||||
};
|
||||
|
||||
@end
|
||||
+(NSString*)savedResponseFilenameWithResponse:(GSWResponse*)response
|
||||
remoteAddress:(NSString*)remoteAddress
|
||||
{
|
||||
NSString* dateString=[[NSCalendarDate calendarDate] descriptionWithCalendarFormat:@"%Y-%m-%d_%H-%M-%S.%F"];
|
||||
return [NSString stringWithFormat:@"GSWeb-%@-Response-%@-%@-%p",
|
||||
[[GSWApplication application]name],
|
||||
dateString,
|
||||
(remoteAddress ? remoteAddress : @"unknown"),
|
||||
response];
|
||||
};
|
||||
|
||||
+(void)saveResponse:(GSWResponse*)response
|
||||
data:(NSData*)allResponseData
|
||||
remoteAddress:(NSString*)remoteAddress
|
||||
{
|
||||
NSString* path=nil;
|
||||
LOGObjectFnStart();
|
||||
path=[GSWApplication saveResponsesPath];
|
||||
if (path)
|
||||
{
|
||||
path=[path stringByAppendingPathComponent:[self savedResponseFilenameWithResponse:response
|
||||
remoteAddress:remoteAddress]];
|
||||
NSDebugDeepMLog(@"path=%@:",path);
|
||||
NS_DURING
|
||||
{
|
||||
NSString* str=[[[NSString alloc]initWithData:allResponseData
|
||||
encoding:NSASCIIStringEncoding]autorelease];
|
||||
[str writeToFile:path
|
||||
atomically:NO];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"GSWDefaultAdaptorThread: Exception:%@ (%@)",
|
||||
localException,[localException reason]);
|
||||
NSDebugMLog(@"EXCEPTION GSWDefaultAdaptorThread: Exception:%@ (%@)",
|
||||
localException,[localException reason]);
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
}
|
||||
LOGObjectFnStop();
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -176,9 +176,9 @@ Description: <EOKeyValueUnarchiver: 0x1a84d20>
|
|||
[unarchiver ensureObjectAwake:_dataSource];
|
||||
if ([self fetchesOnLoad])
|
||||
{
|
||||
NSLog(@"***** awakeFromKeyValueUnarchiver in GSWDisplayGroup is called *****");
|
||||
[self fetch];
|
||||
// [self fetch];//?? NO: fetch "each time it is loaded in web browser"
|
||||
NSLog(@"***** awakeFromKeyValueUnarchiver in GSWDisplayGroup is called *****");
|
||||
[self fetch];
|
||||
// [self fetch];//?? NO: fetch "each time it is loaded in web browser"
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
@ -1102,7 +1102,8 @@ Description: <EOKeyValueUnarchiver: 0x1a84d20>
|
|||
|
||||
NSDebugMLLog(@"gswdisplaygroup",@"Will [_dataSource createObject]");
|
||||
object = [_dataSource createObject];
|
||||
NSDebugMLLog(@"gswdisplaygroup",@"End [_dataSource createObject]");
|
||||
NSDebugMLLog(@"gswdisplaygroup",@"End [_dataSource createObject]. Object %p=%@",
|
||||
object,object);
|
||||
if(object == nil)
|
||||
{
|
||||
if(_delegateRespondsTo.createObjectFailed == YES)
|
||||
|
@ -1783,15 +1784,22 @@ self setSelectionIndexes:indexes of objects in objects? //ret 1
|
|||
|
||||
- (void)setMasterObject:(id)masterObject
|
||||
{
|
||||
//OK
|
||||
EODetailDataSource *source=nil;
|
||||
LOGObjectFnStart();
|
||||
|
||||
NSDebugMLLog(@"gswdisplaygroup",@"masterObject=%@",masterObject);
|
||||
if([self hasDetailDataSource] == YES)
|
||||
{
|
||||
source = (EODetailDataSource *)_dataSource;
|
||||
NSDebugMLLog(@"gswdisplaygroup",@"source=%@",source);
|
||||
NSDebugMLLog(@"gswdisplaygroup",@"[source detailKey]=%@",[source detailKey]);
|
||||
[_dataSource qualifyWithRelationshipKey:[source detailKey]
|
||||
ofObject:masterObject];
|
||||
}
|
||||
if ([self fetchesOnLoad])
|
||||
{
|
||||
[self fetch];
|
||||
};
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
}
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
-(id)copyWithZone:(NSZone *)zone;
|
||||
-(const char*)cString;
|
||||
-(unsigned int)cStringLength;
|
||||
-(BOOL)isSearchOverForSenderID:(NSString*)senderID;
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
|
|
|
@ -186,7 +186,7 @@ static char rcsId[] = "$Id$";
|
|||
return obj;
|
||||
};
|
||||
|
||||
-(BOOL)isSearchOverForSenderID:senderID
|
||||
-(BOOL)isSearchOverForSenderID:(NSString*)senderID
|
||||
{
|
||||
BOOL over=NO;
|
||||
if (senderID == nil)
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWForm.h - GSWeb: Class GSWForm
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWForm.h - <title>GSWeb: Class GSWForm</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$
|
||||
|
||||
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 +24,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,50 +35,55 @@
|
|||
//OK
|
||||
@interface GSWForm: GSWHTMLDynamicElement
|
||||
{
|
||||
GSWAssociation* action;
|
||||
GSWAssociation* href;
|
||||
GSWAssociation* multipleSubmit;
|
||||
GSWAssociation* actionClass;
|
||||
GSWAssociation* directActionName;
|
||||
GSWAssociation* queryDictionary;
|
||||
GSWAssociation* _action;
|
||||
GSWAssociation* _href;
|
||||
GSWAssociation* _multipleSubmit;
|
||||
GSWAssociation* _actionClass;
|
||||
GSWAssociation* _directActionName;
|
||||
GSWAssociation* _queryDictionary;
|
||||
//GSWeb Additions {
|
||||
GSWAssociation* disabled;
|
||||
GSWAssociation* enabled;
|
||||
GSWAssociation* _disabled;
|
||||
GSWAssociation* _enabled;
|
||||
// }
|
||||
NSDictionary* otherQueryAssociations;
|
||||
NSDictionary* _otherQueryAssociations;
|
||||
};
|
||||
|
||||
-(id)description;
|
||||
-(id)elementName;
|
||||
-(void)dealloc;
|
||||
|
||||
-(id)initWithName:(NSString*)name_
|
||||
associations:(NSDictionary*)associations_
|
||||
contentElements:(NSArray*)elements_;
|
||||
-(id)initWithName:(NSString*)name
|
||||
associations:(NSDictionary*)associations
|
||||
contentElements:(NSArray*)elements;
|
||||
@end
|
||||
|
||||
|
||||
@interface GSWForm (GSWFormA)
|
||||
#if !GSWEB_STRICT
|
||||
-(BOOL)disabledInContext:(GSWContext*)_context;
|
||||
-(BOOL)disabledInContext:(GSWContext*)context;
|
||||
#endif
|
||||
-(BOOL)compactHTMLTags;
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(void)_appendHiddenFieldsToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(NSDictionary*)computeQueryDictionaryInContext:(GSWContext*)context_;
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)context;
|
||||
|
||||
-(void)_appendHiddenFieldsToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)context;
|
||||
|
||||
-(NSDictionary*)computeQueryDictionaryInContext:(GSWContext*)context;
|
||||
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)context;
|
||||
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)context;
|
||||
@end
|
||||
|
||||
@interface GSWForm (GSWFormB)
|
||||
-(void)appendGSWebObjectsAssociationsToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(void)_appendCGIActionToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_;
|
||||
-(void)appendGSWebObjectsAssociationsToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)context;
|
||||
|
||||
-(void)_appendCGIActionToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)context;
|
||||
@end
|
||||
|
||||
@interface GSWForm (GSWFormC)
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
/* GSWForm.m - GSWeb: Class GSWForm
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWForm.m - <title>GSWeb: Class GSWForm</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$
|
||||
|
||||
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 +24,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,92 +35,96 @@ static char rcsId[] = "$Id$";
|
|||
@implementation GSWForm
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(id)initWithName:(NSString*)name_
|
||||
associations:(NSDictionary*)associations_
|
||||
contentElements:(NSArray*)elements_
|
||||
-(id)initWithName:(NSString*)aName
|
||||
associations:(NSDictionary*)associations
|
||||
contentElements:(NSArray*)elements
|
||||
{
|
||||
NSMutableDictionary* _associations=[NSMutableDictionary dictionaryWithDictionary:associations_];
|
||||
NSMutableDictionary* tmpAssociations=[NSMutableDictionary dictionaryWithDictionary:associations];
|
||||
LOGObjectFnStartC("GSWForm");
|
||||
NSDebugMLLog(@"gswdync",@"name_=%@ associations_:%@ elements_=%@",name_,associations_,elements_);
|
||||
if (![_associations objectForKey:@"method"])
|
||||
{
|
||||
if ([_associations objectForKey:@"get"])
|
||||
[_associations setObject:[GSWAssociation associationWithValue:@"get"]
|
||||
forKey:@"method"];
|
||||
else
|
||||
[_associations setObject:[GSWAssociation associationWithValue:@"post"]
|
||||
forKey:@"method"];
|
||||
};
|
||||
[_associations removeObjectForKey:action__Key];
|
||||
[_associations removeObjectForKey:href__Key];
|
||||
[_associations removeObjectForKey:multipleSubmit__Key];
|
||||
[_associations removeObjectForKey:actionClass__Key];
|
||||
if (directActionName)
|
||||
[_associations removeObjectForKey:directActionName];
|
||||
NSDebugMLLog(@"gswdync",@"aName=%@ associations:%@ elements=%@",aName,associations,elements);
|
||||
if (![tmpAssociations objectForKey:@"method"])
|
||||
{
|
||||
if ([tmpAssociations objectForKey:@"get"])
|
||||
[tmpAssociations setObject:[GSWAssociation associationWithValue:@"get"]
|
||||
forKey:@"method"];
|
||||
else
|
||||
[tmpAssociations setObject:[GSWAssociation associationWithValue:@"post"]
|
||||
forKey:@"method"];
|
||||
};
|
||||
[tmpAssociations removeObjectForKey:action__Key];
|
||||
[tmpAssociations removeObjectForKey:href__Key];
|
||||
[tmpAssociations removeObjectForKey:multipleSubmit__Key];
|
||||
[tmpAssociations removeObjectForKey:actionClass__Key];
|
||||
if (_directActionName)
|
||||
[tmpAssociations removeObjectForKey:_directActionName];
|
||||
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
[_associations removeObjectForKey:disabled__Key];
|
||||
[_associations removeObjectForKey:enabled__Key];
|
||||
[tmpAssociations removeObjectForKey:disabled__Key];
|
||||
[tmpAssociations removeObjectForKey:enabled__Key];
|
||||
};
|
||||
[_associations removeObjectForKey:queryDictionary__Key];
|
||||
[tmpAssociations removeObjectForKey:queryDictionary__Key];
|
||||
|
||||
//call isValueSettable sur value (return YES)
|
||||
action = [[associations_ objectForKey:action__Key
|
||||
withDefaultObject:[action autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWForm: action=%@",action);
|
||||
href = [[associations_ objectForKey:href__Key
|
||||
withDefaultObject:[href autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWForm: href=%@",href);
|
||||
multipleSubmit = [[associations_ objectForKey:multipleSubmit__Key
|
||||
withDefaultObject:[multipleSubmit autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWForm: multipleSubmit=%@",multipleSubmit);
|
||||
actionClass = [[associations_ objectForKey:actionClass__Key
|
||||
withDefaultObject:[actionClass autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWForm: actionClass=%@",actionClass);
|
||||
directActionName = [[associations_ objectForKey:directActionName__Key
|
||||
withDefaultObject:[directActionName autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWForm: directActionName=%@",directActionName);
|
||||
_action = [[associations objectForKey:action__Key
|
||||
withDefaultObject:[_action autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWForm: action=%@",_action);
|
||||
|
||||
_href = [[associations objectForKey:href__Key
|
||||
withDefaultObject:[_href autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWForm: href=%@",_href);
|
||||
|
||||
_multipleSubmit = [[associations objectForKey:multipleSubmit__Key
|
||||
withDefaultObject:[_multipleSubmit autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWForm: multipleSubmit=%@",_multipleSubmit);
|
||||
|
||||
_actionClass = [[associations objectForKey:actionClass__Key
|
||||
withDefaultObject:[_actionClass autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWForm: actionClass=%@",_actionClass);
|
||||
|
||||
_directActionName = [[associations objectForKey:directActionName__Key
|
||||
withDefaultObject:[_directActionName autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWForm: directActionName=%@",_directActionName);
|
||||
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
disabled = [[associations_ objectForKey:disabled__Key
|
||||
withDefaultObject:[disabled autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWForm disabled=%@",disabled);
|
||||
enabled = [[associations_ objectForKey:enabled__Key
|
||||
withDefaultObject:[enabled autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWForm enabled=%@",enabled);
|
||||
if (disabled && enabled)
|
||||
_disabled = [[associations objectForKey:disabled__Key
|
||||
withDefaultObject:[_disabled autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWForm disabled=%@",_disabled);
|
||||
_enabled = [[associations objectForKey:enabled__Key
|
||||
withDefaultObject:[_enabled autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWForm enabled=%@",_enabled);
|
||||
if (_disabled && _enabled)
|
||||
{
|
||||
ExceptionRaise(@"GSWForm",@"You can't specify 'disabled' and 'enabled' together. componentAssociations:%@",
|
||||
associations_);
|
||||
associations);
|
||||
};
|
||||
};
|
||||
|
||||
queryDictionary = [[associations_ objectForKey:queryDictionary__Key
|
||||
withDefaultObject:[queryDictionary autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWForm: queryDictionary=%@",queryDictionary);
|
||||
_queryDictionary = [[associations objectForKey:queryDictionary__Key
|
||||
withDefaultObject:[_queryDictionary autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"GSWForm: queryDictionary=%@",_queryDictionary);
|
||||
|
||||
if ((self=[super initWithName:name_
|
||||
attributeAssociations:_associations
|
||||
contentElements:elements_]))
|
||||
{
|
||||
};
|
||||
if ((self=[super initWithName:aName
|
||||
attributeAssociations:tmpAssociations
|
||||
contentElements:elements]))
|
||||
{
|
||||
};
|
||||
return self;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
DESTROY(action);
|
||||
DESTROY(href);
|
||||
DESTROY(multipleSubmit);
|
||||
DESTROY(actionClass);
|
||||
DESTROY(directActionName);
|
||||
DESTROY(queryDictionary);
|
||||
DESTROY(disabled);
|
||||
DESTROY(enabled);
|
||||
DESTROY(otherQueryAssociations);
|
||||
DESTROY(_action);
|
||||
DESTROY(_href);
|
||||
DESTROY(_multipleSubmit);
|
||||
DESTROY(_actionClass);
|
||||
DESTROY(_directActionName);
|
||||
DESTROY(_queryDictionary);
|
||||
DESTROY(_disabled);
|
||||
DESTROY(_enabled);
|
||||
DESTROY(_otherQueryAssociations);
|
||||
[super dealloc];
|
||||
};
|
||||
|
||||
|
@ -122,8 +132,8 @@ static char rcsId[] = "$Id$";
|
|||
-(id)description
|
||||
{
|
||||
return [NSString stringWithFormat:@"<%s %p>",
|
||||
object_get_class_name(self),
|
||||
(void*)self];
|
||||
object_get_class_name(self),
|
||||
(void*)self];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -140,15 +150,15 @@ static char rcsId[] = "$Id$";
|
|||
|
||||
//GSWeb Additions {
|
||||
//--------------------------------------------------------------------
|
||||
-(BOOL)disabledInContext:(GSWContext*)_context
|
||||
-(BOOL)disabledInContext:(GSWContext*)context
|
||||
{
|
||||
//OK
|
||||
if (enabled)
|
||||
return ![self evaluateCondition:enabled
|
||||
inContext:_context];
|
||||
if (_enabled)
|
||||
return ![self evaluateCondition:_enabled
|
||||
inContext:context];
|
||||
else
|
||||
return [self evaluateCondition:disabled
|
||||
inContext:_context];
|
||||
return [self evaluateCondition:_disabled
|
||||
inContext:context];
|
||||
};
|
||||
// }
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -159,163 +169,164 @@ static char rcsId[] = "$Id$";
|
|||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_appendHiddenFieldsToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)_appendHiddenFieldsToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)context
|
||||
{
|
||||
//OK
|
||||
NSDictionary* _hiddenFields=nil;
|
||||
GSWRequest* _request=nil;
|
||||
NSString* _gswsid=nil;
|
||||
NSDictionary* hiddenFields=nil;
|
||||
GSWRequest* request=nil;
|
||||
NSString* gswsid=nil;
|
||||
|
||||
_hiddenFields=[self computeQueryDictionaryInContext:context_];
|
||||
if (_hiddenFields)
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
_request=[context_ request];
|
||||
_gswsid=[_request formValueForKey:GSWKey_SessionID[GSWebNamingConv]];
|
||||
if (_gswsid)
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
hiddenFields=[self computeQueryDictionaryInContext:context];
|
||||
if (hiddenFields)
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
request=[context request];
|
||||
gswsid=[request formValueForKey:GSWKey_SessionID[GSWebNamingConv]];
|
||||
if (gswsid)
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSDictionary*)computeQueryDictionaryInContext:(GSWContext*)context_
|
||||
-(NSDictionary*)computeQueryDictionaryInContext:(GSWContext*)context
|
||||
{
|
||||
//OK
|
||||
GSWComponent* _component=[context_ component];
|
||||
GSWSession* _session=[context_ existingSession];
|
||||
NSString* _sessionID=[_session sessionID];
|
||||
//GSWComponent* component=[context component];
|
||||
//GSWSession* session=[context existingSession];
|
||||
//NSString* sessionID=[session sessionID];
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return [[NSDictionary new] autorelease];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)appendToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)appendToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)context
|
||||
{
|
||||
//OK
|
||||
#ifndef NDEBBUG
|
||||
int elementsNb=[(GSWElementIDString*)[context_ elementID]elementsNb];
|
||||
int elementsNb=[(GSWElementIDString*)[context elementID]elementsNb];
|
||||
#endif
|
||||
LOGObjectFnStartC("GSWForm");
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context elementID]);
|
||||
|
||||
GSWSaveAppendToResponseElementID(context_);//Debug Only
|
||||
GSWSaveAppendToResponseElementID(context);//Debug Only
|
||||
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
BOOL _disabledInContext=NO;
|
||||
_disabledInContext=[self disabledInContext:context_];
|
||||
[context_ setInForm:!_disabledInContext];
|
||||
BOOL disabledInContext=NO;
|
||||
disabledInContext=[self disabledInContext:context];
|
||||
[context setInForm:!disabledInContext];
|
||||
}
|
||||
else
|
||||
[context_ setInForm:YES];
|
||||
[context setInForm:YES];
|
||||
|
||||
[self appendToResponse:response_
|
||||
inContext:context_
|
||||
elementsFromIndex:0
|
||||
toIndex:[elementsMap length]-2];
|
||||
[self _appendHiddenFieldsToResponse:response_
|
||||
inContext:context_];
|
||||
[self appendToResponse:response_
|
||||
inContext:context_
|
||||
[self appendToResponse:response
|
||||
inContext:context
|
||||
elementsFromIndex:0
|
||||
toIndex:[elementsMap length]-2];
|
||||
[self _appendHiddenFieldsToResponse:response
|
||||
inContext:context];
|
||||
[self appendToResponse:response
|
||||
inContext:context
|
||||
elementsFromIndex:[elementsMap length]-1
|
||||
toIndex:[elementsMap length]-1];
|
||||
[context_ setInForm:NO];
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
[context setInForm:NO];
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context elementID]);
|
||||
#ifndef NDEBBUG
|
||||
NSAssert(elementsNb==[(GSWElementIDString*)[context_ elementID]elementsNb],@"GSWForm appendToResponse: bad elementID");
|
||||
NSAssert(elementsNb==[(GSWElementIDString*)[context elementID]elementsNb],
|
||||
@"GSWForm appendToResponse: bad elementID");
|
||||
#endif
|
||||
LOGObjectFnStopC("GSWForm");
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)context
|
||||
{
|
||||
//OK
|
||||
GSWElement* _element=nil;
|
||||
NSString* _senderID=nil;
|
||||
NSString* _elementID=nil;
|
||||
BOOL _isFormSubmited=NO;
|
||||
GSWElement* element=nil;
|
||||
NSString* senderID=nil;
|
||||
GSWElementIDString* elementID=nil;
|
||||
BOOL isFormSubmited=NO;
|
||||
#ifndef NDEBBUG
|
||||
int elementsNb=[(GSWElementIDString*)[context_ elementID]elementsNb];
|
||||
int elementsNb=[(GSWElementIDString*)[context elementID]elementsNb];
|
||||
#endif
|
||||
BOOL _multipleSubmit=NO;
|
||||
BOOL multipleSubmitValue=NO;
|
||||
int i=0;
|
||||
LOGObjectFnStartC("GSWForm");
|
||||
_senderID=[context_ senderID];
|
||||
_elementID=[context_ elementID];
|
||||
senderID=[context senderID];
|
||||
elementID=[context elementID];
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ definition name=%@ id=%@ senderId=%@",
|
||||
[self class],[self definitionName],_elementID,_senderID);
|
||||
[self class],[self definitionName],elementID,senderID);
|
||||
NS_DURING
|
||||
{
|
||||
GSWAssertCorrectElementID(context_);// Debug Only
|
||||
if ([self prefixMatchSenderIDInContext:context_]) //Avoid trying to find action if we are not the good component
|
||||
GSWAssertCorrectElementID(context);// Debug Only
|
||||
if ([self prefixMatchSenderIDInContext:context]) //Avoid trying to find action if we are not the good component
|
||||
{
|
||||
BOOL searchIsOver=NO;
|
||||
_isFormSubmited=[_elementID isEqualToString:_senderID];
|
||||
isFormSubmited=[elementID isEqualToString:senderID];
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@ senderId=%@ _isFormSubmited=%s",
|
||||
[self class],
|
||||
_elementID,
|
||||
_senderID,
|
||||
(_isFormSubmited ? "YES" : "NO"));
|
||||
if (!WOStrictFlag && _isFormSubmited && [self disabledInContext:context_])
|
||||
_isFormSubmited=NO;
|
||||
elementID,
|
||||
senderID,
|
||||
(isFormSubmited ? "YES" : "NO"));
|
||||
if (!WOStrictFlag && isFormSubmited && [self disabledInContext:context])
|
||||
isFormSubmited=NO;
|
||||
|
||||
if (_isFormSubmited)
|
||||
if (isFormSubmited)
|
||||
{
|
||||
[context_ setInForm:YES];
|
||||
[context_ _setFormSubmitted:YES];
|
||||
_multipleSubmit=[self evaluateCondition:multipleSubmit
|
||||
inContext:context_];
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@ senderId=%@ _multipleSubmit=%s",
|
||||
[context setInForm:YES];
|
||||
[context _setFormSubmitted:YES];
|
||||
multipleSubmitValue=[self evaluateCondition:_multipleSubmit
|
||||
inContext:context];
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@ senderId=%@ multipleSubmit=%s",
|
||||
[self class],
|
||||
_elementID,
|
||||
_senderID,
|
||||
(_multipleSubmit ? "YES" : "NO"));
|
||||
[context_ _setIsMultipleSubmitForm:_multipleSubmit];
|
||||
elementID,
|
||||
senderID,
|
||||
(multipleSubmitValue ? "YES" : "NO"));
|
||||
[context _setIsMultipleSubmitForm:multipleSubmitValue];
|
||||
};
|
||||
[context_ appendZeroElementIDComponent];
|
||||
for(i=0;!_element && !searchIsOver && i<[dynamicChildren count];i++)
|
||||
[context appendZeroElementIDComponent];
|
||||
for(i=0;!element && !searchIsOver && i<[dynamicChildren count];i++)
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",
|
||||
[[dynamicChildren objectAtIndex:i] class],
|
||||
[context_ elementID]);
|
||||
_element=[[dynamicChildren objectAtIndex:i] invokeActionForRequest:request_
|
||||
inContext:context_];
|
||||
// if (![context_ _wasFormSubmitted] && [[context_ elementID] compare:_senderID]==NSOrderedDescending)
|
||||
if (![context_ _wasFormSubmitted] && [[context_ elementID] isSearchOverForSenderID:_senderID])
|
||||
[context elementID]);
|
||||
element=[[dynamicChildren objectAtIndex:i] invokeActionForRequest:request
|
||||
inContext:context];
|
||||
// if (![context _wasFormSubmitted] && [[context elementID] compare:senderID]==NSOrderedDescending)
|
||||
if (![context _wasFormSubmitted] && [[context elementID] isSearchOverForSenderID:senderID])
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"id=%@ senderid=%@ => search is over",
|
||||
[context_ elementID],
|
||||
_senderID);
|
||||
[context elementID],
|
||||
senderID);
|
||||
searchIsOver=YES;
|
||||
};
|
||||
[context_ incrementLastElementIDComponent];
|
||||
[context incrementLastElementIDComponent];
|
||||
};
|
||||
[context_ deleteLastElementIDComponent];
|
||||
if (_isFormSubmited)
|
||||
[context deleteLastElementIDComponent];
|
||||
if (isFormSubmited)
|
||||
{
|
||||
if ([context_ _wasActionInvoked])
|
||||
[context_ _setIsMultipleSubmitForm:NO];
|
||||
if ([context _wasActionInvoked])
|
||||
[context _setIsMultipleSubmitForm:NO];
|
||||
else
|
||||
{
|
||||
NSDebugMLLog0(@"gswdync",@"formSubmitted but no action was invoked!");
|
||||
};
|
||||
[context_ setInForm:NO];
|
||||
[context_ _setFormSubmitted:NO];
|
||||
[context setInForm:NO];
|
||||
[context _setFormSubmitted:NO];
|
||||
};
|
||||
_elementID=[context_ elementID];
|
||||
elementID=[context elementID];
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ def name=%@ id=%@",
|
||||
[self class],
|
||||
[self definitionName],
|
||||
_elementID);
|
||||
elementID);
|
||||
#ifndef NDEBBUG
|
||||
NSAssert(elementsNb==[(GSWElementIDString*)_elementID elementsNb],
|
||||
NSAssert(elementsNb==[(GSWElementIDString*)elementID elementsNb],
|
||||
@"GSWForm invokeActionForRequest: bad elementID");
|
||||
#endif
|
||||
};
|
||||
|
@ -330,74 +341,75 @@ static char rcsId[] = "$Id$";
|
|||
[localException raise];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
_senderID=[context_ senderID];
|
||||
_elementID=[context_ elementID];
|
||||
//if (![context_ _wasActionInvoked] && [_elementID compare:_senderID]!=NSOrderedAscending)
|
||||
if (![context_ _wasActionInvoked] && [_elementID isSearchOverForSenderID:_senderID])
|
||||
senderID=[context senderID];
|
||||
elementID=[context elementID];
|
||||
//if (![context _wasActionInvoked] && [_elementID compare:senderID]!=NSOrderedAscending)
|
||||
if (![context _wasActionInvoked] && [elementID isSearchOverForSenderID:senderID])
|
||||
{
|
||||
LOGError(@"Action not invoked at the end of %@ (def name=%@) (id=%@) senderId=%@",
|
||||
[self class],
|
||||
[self definitionName],
|
||||
_elementID,
|
||||
_senderID);
|
||||
elementID,
|
||||
senderID);
|
||||
};
|
||||
LOGObjectFnStopC("GSWForm");
|
||||
return _element;
|
||||
return element;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)takeValuesFromRequest:(GSWRequest*)request
|
||||
inContext:(GSWContext*)context
|
||||
{
|
||||
//OK
|
||||
NSString* _senderID=nil;
|
||||
NSString* _elementID=nil;
|
||||
BOOL _isFormSubmited=NO;
|
||||
NSString* senderID=nil;
|
||||
NSString* elementID=nil;
|
||||
BOOL isFormSubmited=NO;
|
||||
int i=0;
|
||||
#ifndef NDEBBUG
|
||||
int elementsNb=[(GSWElementIDString*)[context_ elementID]elementsNb];
|
||||
int elementsNb=[(GSWElementIDString*)[context elementID]elementsNb];
|
||||
#endif
|
||||
LOGObjectFnStartC("GSWForm");
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
GSWAssertCorrectElementID(context_);// Debug Only
|
||||
_senderID=[context_ senderID];
|
||||
_elementID=[context_ elementID];
|
||||
NSDebugMLLog(@"gswdync",@"_senderID=%@",_senderID);
|
||||
NSDebugMLLog(@"gswdync",@"_elementID=%@",_elementID);
|
||||
if ([self prefixMatchSenderIDInContext:context_]) //Avoid taking values if we are not the good form
|
||||
{
|
||||
_isFormSubmited=[_elementID isEqualToString:_senderID];
|
||||
NSDebugMLLog(@"gswdync",@"_isFormSubmited=%d",(int)_isFormSubmited);
|
||||
if (!WOStrictFlag && _isFormSubmited && [self disabledInContext:context_])
|
||||
_isFormSubmited=NO;
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context elementID]);
|
||||
GSWAssertCorrectElementID(context);// Debug Only
|
||||
senderID=[context senderID];
|
||||
elementID=[context elementID];
|
||||
NSDebugMLLog(@"gswdync",@"senderID=%@",senderID);
|
||||
NSDebugMLLog(@"gswdync",@"elementID=%@",elementID);
|
||||
if ([self prefixMatchSenderIDInContext:context]) //Avoid taking values if we are not the good form
|
||||
{
|
||||
isFormSubmited=[elementID isEqualToString:senderID];
|
||||
NSDebugMLLog(@"gswdync",@"isFormSubmited=%d",(int)isFormSubmited);
|
||||
if (!WOStrictFlag && isFormSubmited && [self disabledInContext:context])
|
||||
isFormSubmited=NO;
|
||||
|
||||
NSDebugMLLog(@"gswdync",@"Starting GSWForm TV ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
if (_isFormSubmited)
|
||||
{
|
||||
[context_ setInForm:YES];
|
||||
[context_ _setFormSubmitted:YES];
|
||||
};
|
||||
[context_ appendZeroElementIDComponent];
|
||||
NSDebugMLLog(@"gswdync",@"\n\ndynamicChildren=%@",dynamicChildren);
|
||||
NSDebugMLLog(@"gswdync",@"[dynamicChildren count]=%d",[dynamicChildren count]);
|
||||
for(i=0;i<[dynamicChildren count];i++)
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[[dynamicChildren objectAtIndex:i] class],[context_ elementID]);
|
||||
NSDebugMLLog(@"gswdync",@"\n[dynamicChildren objectAtIndex:i]=%@",[dynamicChildren objectAtIndex:i]);
|
||||
[[dynamicChildren objectAtIndex:i] takeValuesFromRequest:request_
|
||||
inContext:context_];
|
||||
[context_ incrementLastElementIDComponent];
|
||||
};
|
||||
[context_ deleteLastElementIDComponent];
|
||||
if (_isFormSubmited)
|
||||
{
|
||||
[context_ setInForm:NO];
|
||||
[context_ _setFormSubmitted:NO];
|
||||
};
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context_ elementID]);
|
||||
NSDebugMLLog(@"gswdync",@"Starting GSWForm TV ET=%@ id=%@",[self class],[context elementID]);
|
||||
if (isFormSubmited)
|
||||
{
|
||||
[context setInForm:YES];
|
||||
[context _setFormSubmitted:YES];
|
||||
};
|
||||
[context appendZeroElementIDComponent];
|
||||
NSDebugMLLog(@"gswdync",@"\n\ndynamicChildren=%@",dynamicChildren);
|
||||
NSDebugMLLog(@"gswdync",@"[dynamicChildren count]=%d",[dynamicChildren count]);
|
||||
for(i=0;i<[dynamicChildren count];i++)
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[[dynamicChildren objectAtIndex:i] class],[context elementID]);
|
||||
NSDebugMLLog(@"gswdync",@"\n[dynamicChildren objectAtIndex:i]=%@",[dynamicChildren objectAtIndex:i]);
|
||||
[[dynamicChildren objectAtIndex:i] takeValuesFromRequest:request
|
||||
inContext:context];
|
||||
[context incrementLastElementIDComponent];
|
||||
};
|
||||
[context deleteLastElementIDComponent];
|
||||
if (isFormSubmited)
|
||||
{
|
||||
[context setInForm:NO];
|
||||
[context _setFormSubmitted:NO];
|
||||
};
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context elementID]);
|
||||
#ifndef NDEBBUG
|
||||
NSAssert(elementsNb==[(GSWElementIDString*)[context_ elementID]elementsNb],@"GSWForm takeValuesFromRequest: bad elementID");
|
||||
NSAssert(elementsNb==[(GSWElementIDString*)[context elementID]elementsNb],
|
||||
@"GSWForm takeValuesFromRequest: bad elementID");
|
||||
#endif
|
||||
LOGObjectFnStopC("GSWForm");
|
||||
};
|
||||
|
@ -408,38 +420,38 @@ static char rcsId[] = "$Id$";
|
|||
@implementation GSWForm (GSWFormB)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)appendGSWebObjectsAssociationsToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)appendGSWebObjectsAssociationsToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)context
|
||||
{
|
||||
//OK//TODOV
|
||||
BOOL _disabledInContext=NO;
|
||||
BOOL disabledInContext=NO;
|
||||
LOGObjectFnStartC("GSWForm");
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
_disabledInContext=[self disabledInContext:context_];
|
||||
NSDebugMLLog(@"gswdync",@"_disabledInContext=%s",(_disabledInContext ? "YES" : "NO"));
|
||||
disabledInContext=[self disabledInContext:context];
|
||||
NSDebugMLLog(@"gswdync",@"disabledInContext=%s",(disabledInContext ? "YES" : "NO"));
|
||||
};
|
||||
if (!disabledInContext)
|
||||
{
|
||||
GSWComponent* component=[context component];
|
||||
id actionValue=nil;
|
||||
if (_href)
|
||||
actionValue=[_href valueInComponent:component];
|
||||
else
|
||||
actionValue=[context componentActionURL];
|
||||
[response appendContentCharacter:' '];
|
||||
[response _appendContentAsciiString:@"action"];
|
||||
[response appendContentCharacter:'='];
|
||||
[response appendContentCharacter:'"'];
|
||||
[response appendContentString:actionValue];
|
||||
[response appendContentCharacter:'"'];
|
||||
};
|
||||
if (!_disabledInContext)
|
||||
{
|
||||
GSWComponent* _component=[context_ component];
|
||||
id _actionValue=nil;
|
||||
if (href)
|
||||
_actionValue=[href valueInComponent:_component];
|
||||
else
|
||||
_actionValue=[context_ componentActionURL];
|
||||
[response_ appendContentCharacter:' '];
|
||||
[response_ _appendContentAsciiString:@"action"];
|
||||
[response_ appendContentCharacter:'='];
|
||||
[response_ appendContentCharacter:'"'];
|
||||
[response_ appendContentString:_actionValue];
|
||||
[response_ appendContentCharacter:'"'];
|
||||
};
|
||||
LOGObjectFnStopC("GSWForm");
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(void)_appendCGIActionToResponse:(GSWResponse*)response_
|
||||
inContext:(GSWContext*)context_
|
||||
-(void)_appendCGIActionToResponse:(GSWResponse*)response
|
||||
inContext:(GSWContext*)context
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
};
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
/* GSWGeometricRegion.h - GSWeb: Class GSWRequest
|
||||
Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
/** GSWGeometricRegion.h - <title>GSWeb: Class GSWRequest</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: Sept 1999
|
||||
|
||||
$Revision$
|
||||
$Date$
|
||||
|
||||
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 +23,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$
|
||||
|
||||
|
@ -30,38 +35,38 @@
|
|||
//====================================================================
|
||||
@interface GSWGeometricRegion : NSObject <NSCopying>
|
||||
{
|
||||
NSString* userDefinedString;
|
||||
id userDefinedValue;
|
||||
NSString* _userDefinedString;
|
||||
id _userDefinedValue;
|
||||
};
|
||||
|
||||
+(NSArray*)geometricRegionsWithFile:(NSString*)fileName_;
|
||||
+(NSArray*)geometricRegionsWithString:(NSString*)string_;
|
||||
+(GSWGeometricRegion*)regionWithShape:(NSString*)shape_
|
||||
coordinates:(NSArray*)coords
|
||||
userDefinedString:(NSString*)userDefinedString_;
|
||||
+(GSWGeometricRegion*)regionWithShape:(NSString*)shape_
|
||||
coordinates:(NSArray*)coords
|
||||
userDefinedString:(NSString*)userDefinedString_
|
||||
userDefinedValue:(id)userDefinedValue_;
|
||||
+(NSArray*)geometricRegionsWithFile:(NSString*)fileName;
|
||||
+(NSArray*)geometricRegionsWithString:(NSString*)string;
|
||||
+(GSWGeometricRegion*)regionWithShape:(NSString*)shape
|
||||
coordinates:(NSArray*)coords
|
||||
userDefinedString:(NSString*)userDefinedString;
|
||||
+(GSWGeometricRegion*)regionWithShape:(NSString*)shape
|
||||
coordinates:(NSArray*)coords
|
||||
userDefinedString:(NSString*)userDefinedString
|
||||
userDefinedValue:(id)userDefinedValue;
|
||||
|
||||
-(id)initWithShape:(NSString*)shape_
|
||||
coordinates:(NSArray*)coords_
|
||||
userDefinedString:(NSString*)userDefinedString_;
|
||||
-(id)initWithShape:(NSString*)shape_
|
||||
coordinates:(NSArray*)coords_
|
||||
userDefinedString:(NSString*)userDefinedString_
|
||||
userDefinedValue:(id)userDefinedValue_;
|
||||
-(id)initWithShape:(NSString*)shape
|
||||
coordinates:(NSArray*)coords
|
||||
userDefinedString:(NSString*)userDefinedString;
|
||||
-(id)initWithShape:(NSString*)shape
|
||||
coordinates:(NSArray*)coords
|
||||
userDefinedString:(NSString*)userDefinedString
|
||||
userDefinedValue:(id)userDefinedValue;
|
||||
-(void)dealloc;
|
||||
-(id)copyWithZone:(NSZone*)zone_;
|
||||
-(id)copyWithZone:(NSZone*)zone;
|
||||
-(NSString*)description;
|
||||
-(NSString*)userDefinedString;
|
||||
-(id)userDefinedValue;
|
||||
-(BOOL)hitTest:(NSPoint*)point_;
|
||||
-(BOOL)hitTestX:(unsigned int)x_
|
||||
y:(unsigned int)y_;
|
||||
+(GSWGeometricRegion*)hitTestX:(int)x_
|
||||
y:(int)y_
|
||||
inRegions:(NSArray*)regions_;
|
||||
-(BOOL)hitTest:(NSPoint*)point;
|
||||
-(BOOL)hitTestX:(unsigned int)x
|
||||
y:(unsigned int)y;
|
||||
+(GSWGeometricRegion*)hitTestX:(int)x
|
||||
y:(int)y
|
||||
inRegions:(NSArray*)regions;
|
||||
|
||||
|
||||
@end
|
||||
|
@ -70,60 +75,57 @@
|
|||
//====================================================================
|
||||
@interface GSWArcRegion : GSWGeometricRegion
|
||||
{
|
||||
NSPoint center;
|
||||
NSSize size;
|
||||
int start; // angle degres
|
||||
int stop; // angle degres
|
||||
NSPoint _center;
|
||||
NSSize _size;
|
||||
int _start; // angle degres
|
||||
int _stop; // angle degres
|
||||
};
|
||||
|
||||
+(id)arcRegionWithShape:(NSString*)shape_
|
||||
center:(NSPoint)center_
|
||||
size:(NSSize)size_
|
||||
start:(int)start
|
||||
stop:(int)stop
|
||||
userDefinedString:(NSString*)userDefinedString_;
|
||||
+(id)arcRegionWithShape:(NSString*)shape
|
||||
center:(NSPoint)center
|
||||
size:(NSSize)size
|
||||
start:(int)start
|
||||
stop:(int)stop
|
||||
userDefinedString:(NSString*)userDefinedString;
|
||||
|
||||
+(id)arcRegionWithShape:(NSString*)shape_
|
||||
center:(NSPoint)center_
|
||||
size:(NSSize)size_
|
||||
start:(int)start
|
||||
stop:(int)stop
|
||||
userDefinedString:(NSString*)userDefinedString_
|
||||
userDefinedValue:(id)userDefinedValue_;
|
||||
+(id)arcRegionWithShape:(NSString*)shape
|
||||
center:(NSPoint)center
|
||||
size:(NSSize)size
|
||||
start:(int)start
|
||||
stop:(int)stop
|
||||
userDefinedString:(NSString*)userDefinedString
|
||||
userDefinedValue:(id)userDefinedValue;
|
||||
|
||||
-(id)initWithShape:(NSString*)shape_
|
||||
coordinates:(NSArray*)coords_
|
||||
userDefinedString:(NSString*)userDefinedString_;
|
||||
-(id)initWithShape:(NSString*)shape
|
||||
coordinates:(NSArray*)coords
|
||||
userDefinedString:(NSString*)userDefinedString;
|
||||
|
||||
-(id)initWithShape:(NSString*)shape_
|
||||
coordinates:(NSArray*)coords_
|
||||
userDefinedString:(NSString*)userDefinedString_
|
||||
userDefinedValue:(id)userDefinedValue_;
|
||||
-(id)initWithShape:(NSString*)shape
|
||||
coordinates:(NSArray*)coords
|
||||
userDefinedString:(NSString*)userDefinedString
|
||||
userDefinedValue:(id)userDefinedValue;
|
||||
|
||||
|
||||
-(id)initWithShape:(NSString*)shape_
|
||||
center:(NSPoint)center_
|
||||
size:(NSSize)size_
|
||||
start:(int)start
|
||||
stop:(int)stop
|
||||
userDefinedString:(NSString*)userDefinedString_;
|
||||
-(id)initWithShape:(NSString*)shape
|
||||
center:(NSPoint)center
|
||||
size:(NSSize)size
|
||||
start:(int)start
|
||||
stop:(int)stop
|
||||
userDefinedString:(NSString*)userDefinedString;
|
||||
|
||||
|
||||
-(id)initWithShape:(NSString*)shape_
|
||||
center:(NSPoint)center_
|
||||
size:(NSSize)size_
|
||||
start:(int)start
|
||||
stop:(int)stop
|
||||
userDefinedString:(NSString*)userDefinedString_
|
||||
userDefinedValue:(id)userDefinedValue_;
|
||||
-(id)initWithShape:(NSString*)shape
|
||||
center:(NSPoint)center
|
||||
size:(NSSize)size
|
||||
start:(int)start
|
||||
stop:(int)stop
|
||||
userDefinedString:(NSString*)userDefinedString
|
||||
userDefinedValue:(id)userDefinedValue;
|
||||
|
||||
-(NSString*)description;
|
||||
-(id)copyWithZone:(NSZone*)zone_;
|
||||
-(BOOL)hitTestX:(unsigned int)x_
|
||||
y:(unsigned int)y_;
|
||||
|
||||
|
||||
|
||||
-(id)copyWithZone:(NSZone*)zone;
|
||||
-(BOOL)hitTestX:(unsigned int)x
|
||||
y:(unsigned int)y;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -132,37 +134,37 @@
|
|||
{
|
||||
};
|
||||
|
||||
+(id)ellipseRegionWithShape:(NSString*)shape_
|
||||
center:(NSPoint)center_
|
||||
size:(NSSize)size_
|
||||
userDefinedString:(NSString*)userDefinedString_;
|
||||
+(id)ellipseRegionWithShape:(NSString*)shape
|
||||
center:(NSPoint)center
|
||||
size:(NSSize)size
|
||||
userDefinedString:(NSString*)userDefinedString;
|
||||
|
||||
+(id)ellipseRegionWithShape:(NSString*)shape_
|
||||
center:(NSPoint)center_
|
||||
size:(NSSize)size_
|
||||
userDefinedString:(NSString*)userDefinedString_
|
||||
userDefinedValue:(id)userDefinedValue_;
|
||||
+(id)ellipseRegionWithShape:(NSString*)shape
|
||||
center:(NSPoint)center
|
||||
size:(NSSize)size
|
||||
userDefinedString:(NSString*)userDefinedString
|
||||
userDefinedValue:(id)userDefinedValue;
|
||||
|
||||
|
||||
-(id)initWithShape:(NSString*)shape_
|
||||
coordinates:(NSArray*)coords_
|
||||
userDefinedString:(NSString*)userDefinedString_;
|
||||
-(id)initWithShape:(NSString*)shape
|
||||
coordinates:(NSArray*)coords
|
||||
userDefinedString:(NSString*)userDefinedString;
|
||||
|
||||
-(id)initWithShape:(NSString*)shape_
|
||||
coordinates:(NSArray*)coords_
|
||||
userDefinedString:(NSString*)userDefinedString_
|
||||
userDefinedValue:(id)userDefinedValue_;
|
||||
-(id)initWithShape:(NSString*)shape
|
||||
coordinates:(NSArray*)coords
|
||||
userDefinedString:(NSString*)userDefinedString
|
||||
userDefinedValue:(id)userDefinedValue;
|
||||
|
||||
-(id)initWithShape:(NSString*)shape_
|
||||
center:(NSPoint)center_
|
||||
size:(NSSize)size_
|
||||
userDefinedString:(NSString*)userDefinedString_;
|
||||
-(id)initWithShape:(NSString*)shape
|
||||
center:(NSPoint)center
|
||||
size:(NSSize)size
|
||||
userDefinedString:(NSString*)userDefinedString;
|
||||
|
||||
-(id)initWithShape:(NSString*)shape_
|
||||
center:(NSPoint)center_
|
||||
size:(NSSize)size_
|
||||
userDefinedString:(NSString*)userDefinedString_
|
||||
userDefinedValue:(id)userDefinedValue_;
|
||||
-(id)initWithShape:(NSString*)shape
|
||||
center:(NSPoint)center
|
||||
size:(NSSize)size
|
||||
userDefinedString:(NSString*)userDefinedString
|
||||
userDefinedValue:(id)userDefinedValue;
|
||||
|
||||
-(NSString*)description;
|
||||
@end
|
||||
|
@ -172,35 +174,35 @@
|
|||
{
|
||||
};
|
||||
|
||||
+(id)circularRegionWithShape:(NSString*)shape_
|
||||
center:(NSPoint)center_
|
||||
diameter:(int)diameter_
|
||||
userDefinedString:(NSString*)userDefinedString_;
|
||||
+(id)circularRegionWithShape:(NSString*)shape
|
||||
center:(NSPoint)center
|
||||
diameter:(int)diameter
|
||||
userDefinedString:(NSString*)userDefinedString;
|
||||
|
||||
+(id)circularRegionWithShape:(NSString*)shape_
|
||||
center:(NSPoint)center_
|
||||
diameter:(int)diameter_
|
||||
userDefinedString:(NSString*)userDefinedString_
|
||||
userDefinedValue:(id)userDefinedValue_;
|
||||
+(id)circularRegionWithShape:(NSString*)shape
|
||||
center:(NSPoint)center
|
||||
diameter:(int)diameter
|
||||
userDefinedString:(NSString*)userDefinedString
|
||||
userDefinedValue:(id)userDefinedValue;
|
||||
|
||||
-(id)initWithShape:(NSString*)shape_
|
||||
coordinates:(NSArray*)coords_
|
||||
userDefinedString:(NSString*)userDefinedString_;
|
||||
-(id)initWithShape:(NSString*)shape
|
||||
coordinates:(NSArray*)coords
|
||||
userDefinedString:(NSString*)userDefinedString;
|
||||
|
||||
-(id)initWithShape:(NSString*)shape_
|
||||
coordinates:(NSArray*)coords_
|
||||
userDefinedString:(NSString*)userDefinedString_
|
||||
userDefinedValue:(id)userDefinedValue_;
|
||||
-(id)initWithShape:(NSString*)shape
|
||||
coordinates:(NSArray*)coords
|
||||
userDefinedString:(NSString*)userDefinedString
|
||||
userDefinedValue:(id)userDefinedValue;
|
||||
|
||||
-(id)initWithShape:(NSString*)shape_
|
||||
center:(NSPoint)center_
|
||||
diameter:(int)diameter_
|
||||
userDefinedString:(NSString*)userDefinedString_;
|
||||
-(id)initWithShape:(NSString*)shape_
|
||||
center:(NSPoint)center_
|
||||
diameter:(int)diameter_
|
||||
userDefinedString:(NSString*)userDefinedString_
|
||||
userDefinedValue:(id)userDefinedValue_;
|
||||
-(id)initWithShape:(NSString*)shape
|
||||
center:(NSPoint)center
|
||||
diameter:(int)diameter
|
||||
userDefinedString:(NSString*)userDefinedString;
|
||||
-(id)initWithShape:(NSString*)shape
|
||||
center:(NSPoint)center
|
||||
diameter:(int)diameter
|
||||
userDefinedString:(NSString*)userDefinedString
|
||||
userDefinedValue:(id)userDefinedValue;
|
||||
|
||||
-(NSString*)description;
|
||||
|
||||
|
@ -209,33 +211,33 @@
|
|||
//====================================================================
|
||||
@interface GSWRectangularRegion : GSWGeometricRegion
|
||||
{
|
||||
NSRect rect;
|
||||
NSRect _rect;
|
||||
};
|
||||
|
||||
+(id)rectangularRegionWithShape:(NSString*)shape_
|
||||
rect:(NSRect)rect_
|
||||
userDefinedString:(NSString*)userDefinedString_;
|
||||
+(id)rectangularRegionWithShape:(NSString*)shape_
|
||||
rect:(NSRect)rect_
|
||||
userDefinedString:(NSString*)userDefinedString_
|
||||
userDefinedValue:(id)userDefinedValue_;
|
||||
-(id)initWithShape:(NSString*)shape_
|
||||
coordinates:(NSArray*)coords_
|
||||
userDefinedString:(NSString*)userDefinedString_;
|
||||
-(id)initWithShape:(NSString*)shape_
|
||||
coordinates:(NSArray*)coords_
|
||||
userDefinedString:(NSString*)userDefinedString_
|
||||
userDefinedValue:(id)userDefinedValue_;
|
||||
-(id)initWithShape:(NSString*)shape_
|
||||
rect:(NSRect)rect_
|
||||
userDefinedString:(NSString*)userDefinedString_;
|
||||
-(id)initWithShape:(NSString*)shape_
|
||||
rect:(NSRect)rect_
|
||||
userDefinedString:(NSString*)userDefinedString_
|
||||
userDefinedValue:(id)userDefinedValue_;
|
||||
+(id)rectangularRegionWithShape:(NSString*)shape
|
||||
rect:(NSRect)rect
|
||||
userDefinedString:(NSString*)userDefinedString;
|
||||
+(id)rectangularRegionWithShape:(NSString*)shape
|
||||
rect:(NSRect)rect
|
||||
userDefinedString:(NSString*)userDefinedString
|
||||
userDefinedValue:(id)userDefinedValue;
|
||||
-(id)initWithShape:(NSString*)shape
|
||||
coordinates:(NSArray*)coords
|
||||
userDefinedString:(NSString*)userDefinedString;
|
||||
-(id)initWithShape:(NSString*)shape
|
||||
coordinates:(NSArray*)coords
|
||||
userDefinedString:(NSString*)userDefinedString
|
||||
userDefinedValue:(id)userDefinedValue;
|
||||
-(id)initWithShape:(NSString*)shape
|
||||
rect:(NSRect)rect
|
||||
userDefinedString:(NSString*)userDefinedString;
|
||||
-(id)initWithShape:(NSString*)shape
|
||||
rect:(NSRect)rect
|
||||
userDefinedString:(NSString*)userDefinedString
|
||||
userDefinedValue:(id)userDefinedValue;
|
||||
-(NSString*)description;
|
||||
-(BOOL)hitTestX:(unsigned int)x_
|
||||
y:(unsigned int)y_;
|
||||
-(BOOL)hitTestX:(unsigned int)x
|
||||
y:(unsigned int)y;
|
||||
|
||||
|
||||
|
||||
|
@ -244,28 +246,28 @@
|
|||
//====================================================================
|
||||
@interface GSWPolygonRegion : GSWGeometricRegion
|
||||
{
|
||||
NSArray* points;
|
||||
NSArray* _points;
|
||||
};
|
||||
|
||||
+(id)polygonRegionWithShape:(NSString*)shape_
|
||||
coordinates:(NSArray*)coords
|
||||
userDefinedString:(NSString*)userDefinedString_;
|
||||
+(id)polygonRegionWithShape:(NSString*)shape_
|
||||
coordinates:(NSArray*)coords
|
||||
userDefinedString:(NSString*)userDefinedString_
|
||||
userDefinedValue:(id)userDefinedValue_;
|
||||
+(id)polygonRegionWithShape:(NSString*)shape
|
||||
coordinates:(NSArray*)coords
|
||||
userDefinedString:(NSString*)userDefinedString;
|
||||
+(id)polygonRegionWithShape:(NSString*)shape
|
||||
coordinates:(NSArray*)coords
|
||||
userDefinedString:(NSString*)userDefinedString
|
||||
userDefinedValue:(id)userDefinedValue;
|
||||
|
||||
-(id)initWithShape:(NSString*)shape_
|
||||
coordinates:(NSArray*)coords
|
||||
userDefinedString:(NSString*)userDefinedString_;
|
||||
-(id)initWithShape:(NSString*)shape
|
||||
coordinates:(NSArray*)coords
|
||||
userDefinedString:(NSString*)userDefinedString;
|
||||
|
||||
-(id)initWithShape:(NSString*)shape_
|
||||
coordinates:(NSArray*)coords
|
||||
userDefinedString:(NSString*)userDefinedString_
|
||||
userDefinedValue:(id)userDefinedValue_;
|
||||
-(id)initWithShape:(NSString*)shape
|
||||
coordinates:(NSArray*)coords
|
||||
userDefinedString:(NSString*)userDefinedString
|
||||
userDefinedValue:(id)userDefinedValue;
|
||||
-(NSString*)description;
|
||||
-(BOOL)hitTestX:(unsigned int)x_
|
||||
y:(unsigned int)y_;
|
||||
-(BOOL)hitTestX:(unsigned int)x
|
||||
y:(unsigned int)y;
|
||||
|
||||
@end
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -202,26 +202,29 @@ static int countAutoValue = 0;
|
|||
{
|
||||
GSWComponent* component=[context component];
|
||||
NSString* nameInContext=[self nameInContext:context];
|
||||
NSString* value=[request formValueForKey:nameInContext];
|
||||
NSString* valueValue=[request formValueForKey:nameInContext];
|
||||
NSDebugMLLog(@"gswdync",@"nameInContext=%@",nameInContext);
|
||||
NSDebugMLLog(@"gswdync",@"value=%@",value);
|
||||
if (!WOStrictFlag)
|
||||
NSDebugMLLog(@"gswdync",@"valueValue=%@",valueValue);
|
||||
NS_DURING
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
[value setValue:value
|
||||
inComponent:component];
|
||||
};
|
||||
NS_HANDLER
|
||||
[_value setValue:valueValue
|
||||
inComponent:component];
|
||||
};
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"GSWInput _value=%@ valueValue=%@ exception=%@",
|
||||
_value,valueValue,localException);
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
else
|
||||
{
|
||||
[localException raise];
|
||||
};
|
||||
}
|
||||
else
|
||||
[value setValue:value
|
||||
inComponent:component];
|
||||
NS_ENDHANDLER;
|
||||
};
|
||||
};
|
||||
LOGObjectFnStopC("GSWInput");
|
||||
|
|
|
@ -63,11 +63,13 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
id retValue=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"associations",@"self=%@ ",self);
|
||||
NSDebugMLLog(@"associations",@"keyPath=%@ ",keyPath);
|
||||
NSDebugMLLog(@"associations",@"object_=%@ ", object_);
|
||||
retValue=[GSWAssociation valueInObject:object_
|
||||
forKeyPath:keyPath];
|
||||
NSDebugMLLog(@"associations",@"retValue=%@ (%p) (class=%@)",
|
||||
NSDebugMLLog(@"associations",@"self=%@ retValue=%@ (%p) (class=%@)",
|
||||
self,
|
||||
retValue,
|
||||
retValue,
|
||||
NSStringFromClass([retValue class]));
|
||||
|
|
|
@ -45,7 +45,11 @@
|
|||
GSWAssociation* _selectedValue;
|
||||
GSWAssociation* _noSelectionString;
|
||||
GSWAssociation* _escapeHTML;
|
||||
//GSWeb Additions {
|
||||
BOOL _autoValue;
|
||||
GSWAssociation* _count;
|
||||
GSWAssociation* _index;
|
||||
// }
|
||||
};
|
||||
|
||||
-(void)dealloc;
|
||||
|
|
|
@ -47,6 +47,11 @@ static char rcsId[] = "$Id$";
|
|||
tmpAssociations=[NSMutableDictionary dictionaryWithDictionary:associations];
|
||||
[tmpAssociations removeObjectForKey:list__Key];
|
||||
[tmpAssociations removeObjectForKey:item__Key];
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
[tmpAssociations removeObjectForKey:count__Key];
|
||||
[tmpAssociations removeObjectForKey:index__Key];
|
||||
};
|
||||
[tmpAssociations removeObjectForKey:displayString__Key];
|
||||
[tmpAssociations removeObjectForKey:selection__Key];
|
||||
if (!WOStrictFlag)
|
||||
|
@ -69,7 +74,7 @@ static char rcsId[] = "$Id$";
|
|||
withDefaultObject:[_selection autorelease]] retain];
|
||||
if (_selection && ![_selection isValueSettable])
|
||||
{
|
||||
//TODO
|
||||
ExceptionRaise0(@"GSWPopUpButton",@"'selection' parameter must be settable");
|
||||
};
|
||||
|
||||
if (!WOStrictFlag)
|
||||
|
@ -78,7 +83,7 @@ static char rcsId[] = "$Id$";
|
|||
withDefaultObject:[_selectionValue autorelease]] retain];
|
||||
if (_selectionValue && ![_selectionValue isValueSettable])
|
||||
{
|
||||
//TODO
|
||||
ExceptionRaise0(@"GSWPopUpButton",@"'selectionValue' parameter must be settable");
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -88,6 +93,20 @@ static char rcsId[] = "$Id$";
|
|||
withDefaultObject:[_noSelectionString autorelease]] retain];
|
||||
_escapeHTML=[[associations objectForKey:escapeHTML__Key
|
||||
withDefaultObject:[_escapeHTML autorelease]] retain];
|
||||
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
_count=[[associations objectForKey:count__Key
|
||||
withDefaultObject:[_count autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"count=%@",_count);
|
||||
_index=[[associations objectForKey:index__Key
|
||||
withDefaultObject:[_index autorelease]] retain];
|
||||
NSDebugMLLog(@"gswdync",@"index=%@",_index);
|
||||
if (_index && ![_index isValueSettable])
|
||||
{
|
||||
ExceptionRaise0(@"GSWPopUpButton",@"'index' parameter must be settable");
|
||||
};
|
||||
};
|
||||
};
|
||||
LOGObjectFnStopC("GSWPopUpButton");
|
||||
return self;
|
||||
|
@ -104,6 +123,8 @@ static char rcsId[] = "$Id$";
|
|||
DESTROY(_selectedValue);
|
||||
DESTROY(_noSelectionString);
|
||||
DESTROY(_escapeHTML);
|
||||
DESTROY(_count);//GSWeb Only
|
||||
DESTROY(_index);//GSWeb Only
|
||||
[super dealloc];
|
||||
};
|
||||
|
||||
|
@ -147,6 +168,7 @@ static char rcsId[] = "$Id$";
|
|||
#ifndef ENABLE_OPTGROUP
|
||||
BOOL optGroupLabel=NO;
|
||||
#endif
|
||||
int countValue=0;
|
||||
LOGObjectFnStartC("GSWPopUpButton");
|
||||
[self resetAutoValue];
|
||||
_autoValue = NO;
|
||||
|
@ -155,13 +177,35 @@ static char rcsId[] = "$Id$";
|
|||
component=[context component];
|
||||
[super appendToResponse:response
|
||||
inContext:context];
|
||||
listValue=[_list valueInComponent:component];
|
||||
NSDebugMLLog(@"gswdync",@"listValue=%@",listValue);
|
||||
NSAssert3(!listValue || [listValue respondsToSelector:@selector(count)],
|
||||
@"The list (%@) (%@ of class:%@) doesn't respond to 'count'",
|
||||
_list,
|
||||
listValue,
|
||||
[listValue class]);
|
||||
NSDebugMLLog(@"gswdync",@"_list=%@",_list);
|
||||
if (_list)
|
||||
{
|
||||
listValue=[_list valueInComponent:component];
|
||||
NSDebugMLLog(@"gswdync",@"listValue=%@",listValue);
|
||||
NSAssert3(!listValue || [listValue respondsToSelector:@selector(count)],
|
||||
@"The list (%@) (%@ of class:%@) doesn't respond to 'count'",
|
||||
_list,
|
||||
listValue,
|
||||
[listValue class]);
|
||||
countValue=[listValue count];
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"_count=%@",_count);
|
||||
if (_count)
|
||||
{
|
||||
id tmpCountValue=[_count valueInComponent:component];
|
||||
int tmpCount=0;
|
||||
NSAssert3(!tmpCountValue || [tmpCountValue respondsToSelector:@selector(intValue)],
|
||||
@"The 'count' (%@) value %@ (of class:%@) doesn't respond to 'intValue'",
|
||||
_count,
|
||||
tmpCountValue,
|
||||
[tmpCountValue class]);
|
||||
tmpCount=[tmpCountValue intValue];
|
||||
NSDebugMLog(@"tmpCount=%d",tmpCount);
|
||||
if (_list)
|
||||
countValue=min(tmpCount,countValue);
|
||||
else
|
||||
countValue=tmpCount;
|
||||
}
|
||||
selectionValue=[_selection valueInComponent:component];
|
||||
NSDebugMLLog(@"gswdync",@"selection=%@",_selection);
|
||||
NSDebugMLLog(@"gswdync",@"selectionValue=%@",selectionValue);
|
||||
|
@ -191,32 +235,52 @@ static char rcsId[] = "$Id$";
|
|||
// There is no close tag on OPTION
|
||||
//[response _appendContentAsciiString:@"</OPTION>"];
|
||||
};
|
||||
for(i=0;i<[listValue count];i++)
|
||||
NSDebugMLLog(@"gswdync",@"countValue=%d",countValue);
|
||||
for(i=0;i<countValue;i++)
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"inOptGroup=%s",(inOptGroup ? "YES" : "NO"));
|
||||
itemValue=[listValue objectAtIndex:i];
|
||||
if (listValue)
|
||||
itemValue=[listValue objectAtIndex:i];
|
||||
else
|
||||
itemValue=[NSNumber numberWithShort:i];
|
||||
if (_item)
|
||||
[_item setValue:itemValue
|
||||
inComponent:component];
|
||||
if (_index)
|
||||
[_index setValue:[NSNumber numberWithShort:i]
|
||||
inComponent:component];
|
||||
NSDebugMLLog(@"gswdync",@"itemValue=%@",itemValue);
|
||||
if (itemValue)
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"value=%@",_value);
|
||||
valueValue=[self valueInContext:context];
|
||||
if (_value)
|
||||
valueValue=[self valueInContext:context];
|
||||
else
|
||||
{
|
||||
_autoValue = YES;
|
||||
valueValue = itemValue;
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"valueValue=%@",valueValue);
|
||||
if (valueValue)
|
||||
{
|
||||
BOOL isEqual;
|
||||
BOOL isEqual=NO;
|
||||
|
||||
NSDebugMLLog0(@"gswdync",@"Adding OPTION");
|
||||
[response _appendContentAsciiString:@"\n<OPTION"];
|
||||
NSDebugMLLog(@"gswdync",@"selectionValue=%@",selectionValue);
|
||||
if (_selection)
|
||||
{
|
||||
if (_value)
|
||||
isEqual=SBIsValueEqual(valueValue,selectionValue);
|
||||
{
|
||||
isEqual=SBIsValueEqual(valueValue,selectionValue);
|
||||
//We can have a value but want to compare on item/selection object
|
||||
if (!isEqual)
|
||||
isEqual=(itemValue && (itemValue==selectionValue));
|
||||
}
|
||||
else
|
||||
isEqual=SBIsValueEqual(itemValue,selectionValue);
|
||||
|
||||
NSDebugMLLog(@"gswdync",@"isEqual=%s",(isEqual ? "YES" : "NO"));
|
||||
if (isEqual)
|
||||
{
|
||||
[response appendContentCharacter:' '];
|
||||
|
@ -230,14 +294,13 @@ static char rcsId[] = "$Id$";
|
|||
else
|
||||
isEqual=SBIsValueEqual(itemValue,selectedValueValue);
|
||||
|
||||
NSDebugMLLog(@"gswdync",@"isEqual=%s",(isEqual ? "YES" : "NO"));
|
||||
if (isEqual)
|
||||
{
|
||||
[response appendContentCharacter:' '];
|
||||
[response _appendContentAsciiString:@"selected"];
|
||||
};
|
||||
};
|
||||
if (_value == nil)
|
||||
_autoValue = YES;
|
||||
if (valueValue)
|
||||
{
|
||||
[response _appendContentAsciiString:@" value=\""];
|
||||
|
@ -381,6 +444,7 @@ static char rcsId[] = "$Id$";
|
|||
id formValue=nil;
|
||||
BOOL found=NO;
|
||||
int i=0;
|
||||
int countValue=0;
|
||||
component=[context component];
|
||||
name=[self nameInContext:context];
|
||||
NSDebugMLLog(@"gswdync",@"name=%@",name);
|
||||
|
@ -391,51 +455,85 @@ static char rcsId[] = "$Id$";
|
|||
BOOL isEqual=NO;
|
||||
formValue=[formValues objectAtIndex:0];
|
||||
NSDebugMLLog(@"gswdync",@"formValue=%@",formValue);
|
||||
listValue=[_list valueInComponent:component];
|
||||
NSAssert3(!listValue || [listValue respondsToSelector:@selector(count)],
|
||||
@"The list (%@) (%@ of class:%@) doesn't respond to 'count'",
|
||||
_list,
|
||||
listValue,
|
||||
[listValue class]);
|
||||
for(i=0;!found && i<[listValue count];i++)
|
||||
if (_list)
|
||||
{
|
||||
itemValue=[listValue objectAtIndex:i];
|
||||
NSDebugMLLog(@"gswdync",@"itemValue=%@",itemValue);
|
||||
listValue=[_list valueInComponent:component];
|
||||
NSAssert3(!listValue || [listValue respondsToSelector:@selector(count)],
|
||||
@"The list (%@) (%@ of class:%@) doesn't respond to 'count'",
|
||||
_list,
|
||||
listValue,
|
||||
[listValue class]);
|
||||
countValue=[listValue count];
|
||||
}
|
||||
if (_count)
|
||||
{
|
||||
id tmpCountValue=[_count valueInComponent:component];
|
||||
int tmpCount=0;
|
||||
NSAssert3(!tmpCountValue || [tmpCountValue respondsToSelector:@selector(intValue)],
|
||||
@"The 'count' (%@) value %@ (of class:%@) doesn't respond to 'intValue'",
|
||||
_count,
|
||||
tmpCountValue,
|
||||
[tmpCountValue class]);
|
||||
tmpCount=[tmpCountValue intValue];
|
||||
NSDebugMLog(@"tmpCount=%d",tmpCount);
|
||||
if (_list)
|
||||
countValue=min(tmpCount,countValue);
|
||||
else
|
||||
countValue=tmpCount;
|
||||
}
|
||||
|
||||
for(i=0;!found && i<countValue;i++)
|
||||
{
|
||||
if (listValue)
|
||||
itemValue=[listValue objectAtIndex:i];
|
||||
else
|
||||
itemValue=[NSNumber numberWithShort:i];
|
||||
NSDebugMLLog(@"gswdync",@"itemValue %p=%@ (class %@)",itemValue,itemValue,[itemValue class]);
|
||||
NSDebugMLLog(@"gswdync",@"item=%@",_item);
|
||||
if (_item)
|
||||
[_item setValue:itemValue
|
||||
inComponent:component];
|
||||
if (_index)
|
||||
[_index setValue:[NSNumber numberWithShort:i]
|
||||
inComponent:component];
|
||||
NSDebugMLLog(@"gswdync",@"value=%@",_value);
|
||||
valueValue=[self valueInContext:context];
|
||||
if (_value)
|
||||
valueValue=[self valueInContext:context];
|
||||
else
|
||||
{
|
||||
_autoValue = YES;
|
||||
valueValue=itemValue;
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"valueValue=%@ [class=%@] formValue=%@ [class=%@]",
|
||||
valueValue,[valueValue class],
|
||||
formValue,[formValue class]);
|
||||
isEqual=SBIsValueEqual(valueValue,formValue);
|
||||
if (isEqual)
|
||||
{
|
||||
if(_autoValue == NO)
|
||||
itemValue = valueValue;
|
||||
|
||||
NSDebugMLLog(@"gswdync",@"selection=%@",_selection);
|
||||
if (_selection)
|
||||
{
|
||||
if (!WOStrictFlag)
|
||||
NS_DURING
|
||||
{
|
||||
NS_DURING
|
||||
NSDebugMLLog(@"gswdync",@"itemValue=%@",itemValue);
|
||||
[_selection setValue:itemValue
|
||||
inComponent:component];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"GSWPopUpButton _value=%@ resultValue=%@ exception=%@",
|
||||
_value,resultValue,localException);
|
||||
if (WOStrictFlag)
|
||||
{
|
||||
[_selection setValue:itemValue
|
||||
inComponent:component];
|
||||
};
|
||||
NS_HANDLER
|
||||
[localException raise];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
};
|
||||
}
|
||||
else
|
||||
[_selection setValue:itemValue
|
||||
inComponent:component];
|
||||
NS_ENDHANDLER;
|
||||
};
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
|
@ -446,9 +544,11 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
[_selectionValue setValue:valueValue
|
||||
inComponent:component];
|
||||
};
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"GSWPopUpButton _selectionValue=%@ valueValue=%@ exception=%@",
|
||||
_selectionValue,valueValue,localException);
|
||||
[self handleValidationException:localException
|
||||
inContext:context];
|
||||
}
|
||||
|
@ -464,23 +564,26 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
if (_selection)
|
||||
{
|
||||
if (!WOStrictFlag)
|
||||
NS_DURING
|
||||
{
|
||||
NS_DURING
|
||||
[_selection setValue:nil
|
||||
inComponent:component];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"GSWPopUpButton _selection=%@ exception=%@",
|
||||
_selection,localException);
|
||||
if (WOStrictFlag)
|
||||
{
|
||||
[_selection setValue:nil
|
||||
inComponent:component];
|
||||
};
|
||||
NS_HANDLER
|
||||
[localException raise];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
};
|
||||
}
|
||||
else
|
||||
[_selection setValue:nil
|
||||
inComponent:component];
|
||||
NS_ENDHANDLER;
|
||||
};
|
||||
if (!WOStrictFlag && _selectionValue)
|
||||
{
|
||||
|
@ -491,6 +594,8 @@ static char rcsId[] = "$Id$";
|
|||
};
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"GSWPopUpButton _selectionValue=%@ exception=%@",
|
||||
_selectionValue,localException);
|
||||
[self handleValidationException:localException
|
||||
inContext:context];
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ static char rcsId[] = "$Id$";
|
|||
NSDebugMLLog(@"gswdync",@"item=%@",_item);
|
||||
if (_item && ![_item isValueSettable])
|
||||
{
|
||||
ExceptionRaise0(@"GSWCheckBox",@"'item' parameter must be settable");
|
||||
ExceptionRaise0(@"GSWRepetition",@"'item' parameter must be settable");
|
||||
};
|
||||
_identifier=[[associations objectForKey:identifier__Key
|
||||
withDefaultObject:[_identifier autorelease]] retain];
|
||||
|
@ -60,7 +60,7 @@ static char rcsId[] = "$Id$";
|
|||
NSDebugMLLog(@"gswdync",@"index=%@",_index);
|
||||
if (_index && ![_index isValueSettable])
|
||||
{
|
||||
ExceptionRaise0(@"GSWCheckBox",@"'index' parameter must be settable");
|
||||
ExceptionRaise0(@"GSWRepetition",@"'index' parameter must be settable");
|
||||
};
|
||||
if (elements)
|
||||
{
|
||||
|
@ -122,6 +122,7 @@ static char rcsId[] = "$Id$";
|
|||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context elementID]);
|
||||
component=[context component];
|
||||
NSDebugMLLog(@"gswdync",@"_list=%@",_list);
|
||||
if (_list)
|
||||
{
|
||||
listValue=[_list valueInComponent:component];
|
||||
|
@ -131,6 +132,7 @@ static char rcsId[] = "$Id$";
|
|||
[listValue class]);
|
||||
countValue=[listValue count];
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"_count=%@",_count);
|
||||
if (_count)
|
||||
{
|
||||
id tmpCountValue=[_count valueInComponent:component];
|
||||
|
@ -472,9 +474,9 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
component=[context component];
|
||||
NSDebugMLLog(@"gswdync",@"_item=%@",_item);
|
||||
|
||||
if (_list && _item) {
|
||||
if ([list count]>currentIndex) {
|
||||
NSDebugMLLog(@"gswdync",@"[list objectAtIndex:currentIndex]=%@",[list objectAtIndex:currentIndex]);
|
||||
[_item setValue:[list objectAtIndex:currentIndex]
|
||||
inComponent:component];
|
||||
} else {
|
||||
|
@ -484,15 +486,13 @@ static char rcsId[] = "$Id$";
|
|||
|
||||
NSDebugMLLog(@"gswdync",@"currentIndex=%d",currentIndex);
|
||||
NSDebugMLLog(@"gswdync",@"_index=%@",_index);
|
||||
if (_index) {
|
||||
if (_index)
|
||||
[_index setValue:[NSNumber numberWithShort:currentIndex]
|
||||
inComponent:component];
|
||||
}
|
||||
if (currentIndex==0) {
|
||||
inComponent:component];
|
||||
if (currentIndex==0)
|
||||
[context appendZeroElementIDComponent];
|
||||
} else {
|
||||
else
|
||||
[context incrementLastElementIDComponent];
|
||||
}
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
|
|
|
@ -391,6 +391,16 @@ NSStringEncoding globalDefaultEncoding=NSISOLatin1StringEncoding;
|
|||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// appendDebugCommentContentString:
|
||||
|
||||
-(void)appendDebugCommentContentString:(NSString*)string
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
[self appendContentString:[NSString stringWithFormat:@"<!-- %@ -->",string]];
|
||||
#endif
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// contentEncoding
|
||||
|
||||
|
|
|
@ -618,14 +618,14 @@ extern id gcObjectsToBeVisited;
|
|||
{
|
||||
//OK
|
||||
LOGObjectFnStart();
|
||||
printf("session %p _releaseAutoreleasePool START",self);
|
||||
fprintf(stderr,"session %p _releaseAutoreleasePool START",self);
|
||||
printf("session %p _releaseAutoreleasePool START\n",self);
|
||||
fprintf(stderr,"session %p _releaseAutoreleasePool START\n",self);
|
||||
//TODO-NOW remettre [GarbageCollector collectGarbages];
|
||||
printf("session %p _releaseAutoreleasePool after garbage",self);
|
||||
fprintf(stderr,"session %p _releaseAutoreleasePool after garbage",self);
|
||||
fprintf(stderr,"session %p _releaseAutoreleasePool after garbage\n",self);
|
||||
DESTROY(autoreleasePool);
|
||||
printf("session %p _releaseAutoreleasePool STOP",self);
|
||||
fprintf(stderr,"session %p _releaseAutoreleasePool STOP",self);
|
||||
printf("session %p _releaseAutoreleasePool STOP\n",self);
|
||||
fprintf(stderr,"session %p _releaseAutoreleasePool STOP\n",self);
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
id actionValue=nil;
|
||||
NSDebugMLLog0(@"gswdync",@"Invoked Object Found !!");
|
||||
[context setActionInvoked:1];
|
||||
[context _setActionInvoked:1];
|
||||
NS_DURING
|
||||
{
|
||||
NSDebugMLLog(@"gswdync",@"Invoked Object Found: action=%@",_action);
|
||||
|
|
|
@ -80,23 +80,26 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
GSWComponent* component=[context component];
|
||||
id formValue=[request formValueForKey:[context elementID]];
|
||||
if (!WOStrictFlag)
|
||||
NS_DURING
|
||||
{
|
||||
NS_DURING
|
||||
[_value setValue:formValue
|
||||
inComponent:component];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"GSWText _value=%@ resultValue=%@ exception=%@",
|
||||
_value,resultValue,localException);
|
||||
if (WOStrictFlag)
|
||||
{
|
||||
[_value setValue:formValue
|
||||
inComponent:component];
|
||||
};
|
||||
NS_HANDLER
|
||||
[localException raise];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
};
|
||||
}
|
||||
else
|
||||
[_value setValue:formValue
|
||||
inComponent:component];
|
||||
NS_ENDHANDLER;
|
||||
};
|
||||
[super takeValuesFromRequest:request
|
||||
inContext:context];
|
||||
|
|
|
@ -51,5 +51,9 @@
|
|||
-(NSFormatter*)formatterForComponent:(GSWComponent*)component;
|
||||
@end
|
||||
|
||||
@interface GSWTextField (TurbocatAdditions)
|
||||
- (BOOL)_isFormattedValueInComponent:(GSWComponent *)component
|
||||
equalToFormattedValue:(NSString *)newFormattedValue ;
|
||||
@end
|
||||
|
||||
#endif //_GSWTextField_h__
|
||||
|
|
|
@ -111,7 +111,7 @@ static char rcsId[] = "$Id$";
|
|||
errorDescription:&errorDscr])
|
||||
{
|
||||
NSException* exception=nil;
|
||||
NSString* valueKeyPath=[value keyPath];
|
||||
NSString* valueKeyPath=[_value keyPath];
|
||||
LOGException(@"EOValidationException resultValue=%@ valueKeyPath=%@",
|
||||
resultValue,valueKeyPath);
|
||||
exception=[NSException exceptionWithName:@"EOValidationException"
|
||||
|
@ -139,24 +139,27 @@ static char rcsId[] = "$Id$";
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!WOStrictFlag)
|
||||
NS_DURING
|
||||
{
|
||||
NS_DURING
|
||||
[_value setValue:resultValue
|
||||
inComponent:component];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
LOGException(@"GSWTextField _value=%@ resultValue=%@ exception=%@",
|
||||
_value,resultValue,localException);
|
||||
if (WOStrictFlag)
|
||||
{
|
||||
[_value setValue:resultValue
|
||||
inComponent:component];
|
||||
};
|
||||
NS_HANDLER
|
||||
[localException raise];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self handleValidationException:localException
|
||||
inContext:context];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
};
|
||||
}
|
||||
else
|
||||
[_value setValue:resultValue
|
||||
inComponent:component];
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
};
|
||||
};
|
||||
};
|
||||
LOGObjectFnStopC("GSWTextField");
|
||||
|
@ -248,33 +251,29 @@ static char rcsId[] = "$Id$";
|
|||
- (BOOL)_isFormattedValueInComponent:(GSWComponent *)component
|
||||
equalToFormattedValue:(NSString *)newFormattedValue
|
||||
{
|
||||
id valueValue=nil;
|
||||
id formattedValue=nil;
|
||||
NSFormatter* formatter=nil;
|
||||
BOOL isFormattedValue=NO;
|
||||
|
||||
if (!newFormattedValue)
|
||||
if (newFormattedValue)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
// get own value
|
||||
valueValue=[_value valueInComponent:component];
|
||||
formatter=[self formatterForComponent:component];
|
||||
if (!formatter)
|
||||
{
|
||||
formattedValue=valueValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
formattedValue=[formatter stringForObjectValue:valueValue];
|
||||
id valueValue=nil;
|
||||
id formattedValue=nil;
|
||||
NSFormatter* formatter=nil;
|
||||
|
||||
// get own value
|
||||
valueValue=[_value valueInComponent:component];
|
||||
formatter=[self formatterForComponent:component];
|
||||
if (!formatter)
|
||||
formattedValue=valueValue;
|
||||
else
|
||||
formattedValue=[formatter stringForObjectValue:valueValue];
|
||||
|
||||
if (formattedValue && [newFormattedValue isEqualToString:formattedValue])
|
||||
{
|
||||
NSLog(@"### GSWTextField : are EQUAL ###");
|
||||
isFormattedValue=YES;
|
||||
}
|
||||
};
|
||||
|
||||
if (formattedValue && [newFormattedValue isEqualToString:formattedValue])
|
||||
{
|
||||
NSLog(@"### GSWTextField : are EQUAL ###");
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
return isFormattedValue;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue