2000-02-13 Manuel Guesdon <mguesdon@sbuilders.com>

* GSWStatisticsStore.m: added comment
	* GSWSubmitButton.m: added log and assert
	* GSWImageButton.m: added log and assert
	* GSWHyperlink.m: added log and assert
	* GSWHTMLStaticElement.m: added log and assert
	* GSWForm.m: added log and assert
	* GSWElement.m: added log and assert
	* GSWConditional.m: added log and assert
	* GSWComponentReference.m: added log and assert
	* GSWComponent.m: added log and assert
	* GSWElement.m: added log and assert
	* GSWElement.h: added debug ivar
	* GSWTextField.m: added log and assert
	* GSWInput.m: added log and assert
	* GSWelementIDString.h/.m: added
		-parentElementIDString
		-copyWithZone:
		-mutableCopyWithZone:


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@6019 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mguesdon 2000-02-14 10:57:55 +00:00
parent 9cf4fa4d66
commit 65baa80766
20 changed files with 193 additions and 25 deletions

View file

@ -25,7 +25,6 @@ static char rcsId[] = "$Id$";
#include <gsweb/GSWeb.framework/GSWeb.h>
//====================================================================
@implementation GSWComponent
@ -929,6 +928,7 @@ associationsKeys:(NSArray*)_associationsKeys
#endif
LOGObjectFnStart();
NSDebugMLLog(@"gswcomponents",@"ET=%@ id=%@",[self class],[context_ elementID]);
GSWSaveAppendToResponseElementID(context_);//Debug Only
_template=[self _template];
[response_ appendContentString:[NSString stringWithFormat:@"\n<!-- Start %@ -->\n",[self _templateName]]];//TODO enlever
@ -967,6 +967,7 @@ associationsKeys:(NSArray*)_associationsKeys
NSDebugMLLog(@"gswcomponents",@"ET=%@ id=%@",[self class],[context_ elementID]);
NS_DURING
{
GSWAssertCorrectElementID(context_);// Debug Only
_template=[self _template];
[context_ appendZeroElementIDComponent];
element=[[self _template] invokeActionForRequest:request_
@ -991,6 +992,13 @@ associationsKeys:(NSArray*)_associationsKeys
};
#endif
if (![context_ _wasActionInvoked] && [[[context_ elementID] parentElementIDString] compare:[context_ senderID]]==NSOrderedDescending)
{
LOGError(@"Action not invoked at the end of %@ (id=%@) senderId=%@",
[self class],
[context_ elementID],
[context_ senderID]);
};
LOGObjectFnStop();
return element;
};
@ -1008,6 +1016,8 @@ associationsKeys:(NSArray*)_associationsKeys
GSWElementIDString* debugElementID=[context_ elementID];
#endif
LOGObjectFnStart();
GSWAssertCorrectElementID(context_);// Debug Only
#if !GSWEB_STRICT
[validationFailureMessages removeAllObjects];
#endif

View file

@ -202,6 +202,7 @@ static char rcsId[] = "$Id$";
#endif
LOGObjectFnStart();
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
GSWSaveAppendToResponseElementID(context_);//Debug Only
_componentPrev=[context_ component];
[self pushRefComponentInContext:context_];
if ([context_ component])
@ -232,18 +233,13 @@ static char rcsId[] = "$Id$";
int elementsNb=[(GSWElementIDString*)[context_ elementID]elementsNb];
#endif
LOGObjectFnStart();
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@ senderId=%@",[self class],[context_ elementID],[context_ senderID]);
_componentPrev=[context_ component];
GSWAssertCorrectElementID(context_);// Debug Only
[self pushRefComponentInContext:context_];
if ([context_ component])
{
NSString* _senderID=nil;
NSString* _elementID=nil;
_senderID=[context_ senderID];
_elementID=[context_ elementID];
NSDebugMLLog(@"gswdync",@"_senderID=%@",_senderID);
NSDebugMLLog(@"gswdync",@"_elementID=%@",_elementID);
if ([_senderID hasPrefix:_elementID]) //Avoid trying to find action if we are not the good component
if ([self prefixMatchSenderIDInContext:context_]) //Avoid trying to find action if we are not the good component
{
_component=[context_ component];
_element=[_component invokeActionForRequest:request_
@ -273,6 +269,7 @@ static char rcsId[] = "$Id$";
#endif
LOGObjectFnStart();
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
GSWAssertCorrectElementID(context_);// Debug Only
_componentPrev=[context_ component];
[self pushRefComponentInContext:context_];
if ([context_ component])

View file

@ -25,7 +25,6 @@ static char rcsId[] = "$Id$";
#include <gsweb/GSWeb.framework/GSWeb.h>
//====================================================================
@implementation GSWConditional
@ -95,6 +94,7 @@ static char rcsId[] = "$Id$";
BOOL _doIt=NO;
LOGObjectFnStart();
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
GSWAssertCorrectElementID(context_);// Debug Only
_condition=[self evaluateCondition:condition
inContext:context_];
_negate=[self evaluateCondition:negate
@ -126,7 +126,8 @@ static char rcsId[] = "$Id$";
BOOL _negate=NO;
BOOL _doIt=NO;
LOGObjectFnStart();
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@ senderId=%@",[self class],[context_ elementID],[context_ senderID]);
GSWAssertCorrectElementID(context_);// Debug Only
_condition=[self evaluateCondition:condition
inContext:context_];
_negate=[self evaluateCondition:negate
@ -161,6 +162,7 @@ static char rcsId[] = "$Id$";
BOOL _doIt=NO;
LOGObjectFnStart();
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
GSWSaveAppendToResponseElementID(context_);//Debug Only
_condition=[self evaluateCondition:condition
inContext:context_];
NSDebugMLLog(@"gswdync",@"_condition=%s",_condition ? "YES" : "NO");

View file

@ -31,11 +31,34 @@ extern BYTE ElementsMap_gswebElement;
extern BYTE ElementsMap_dynamicElement;
extern BYTE ElementsMap_attributeElement;
//====================================================================
@interface GSWElement : NSObject
#ifndef NDEBBUG
{
NSString* _appendToResponseElementID;
};
#endif
#ifndef NDEBBUG
-(void)saveAppendToResponseElementIDInContext:(id)context_;
-(void)assertCorrectElementIDInContext:(id)context_
inCLass:(Class)class_
method:(SEL)method_
file:(const char*)file_
line:(int)line_;
#endif
@end
#ifdef NDEBBUG
#define GSWSaveAppendToResponseElementID(context_); {};
#define GSWAssertCorrectElementID(context_); {};
#else
#define GSWSaveAppendToResponseElementID(context_); [self saveAppendToResponseElementIDInContext:context_];
#define GSWAssertCorrectElementID(context_); ([self assertCorrectElementIDInContext:context_ inCLass:[self class] method:_cmd file:__FILE__ line:__LINE__]);
#endif
//====================================================================
@interface GSWElement (GSWRequestHandling)
@ -47,6 +70,7 @@ extern BYTE ElementsMap_attributeElement;
-(void)takeValuesFromRequest:(GSWRequest*)request_
inContext:(GSWContext*)context_;
-(BOOL)prefixMatchSenderIDInContext:(GSWContext*)context_;
@end
#endif //_GSWElement_h__

View file

@ -33,6 +33,45 @@ BYTE ElementsMap_attributeElement = (BYTE)0x41;
//====================================================================
@implementation GSWElement
#ifndef NDEBBUG
-(void)saveAppendToResponseElementIDInContext:(id)context_
{
NSString* _elementID=[context_ elementID];
ASSIGN(_appendToResponseElementID,_elementID);
};
-(void)assertCorrectElementIDInContext:(id)context_
inCLass:(Class)class_
method:(SEL)method_
file:(const char*)file_
line:(int)line_
{
if ([_appendToResponseElementID length]>0)
{
NSString* _elementID=[context_ elementID];
BOOL _appendToResponseElementIDIsFirst=NO;
BOOL _elementIDIsFirst=NO;
BOOL _OK=YES;
_appendToResponseElementIDIsFirst=[_appendToResponseElementID length]==0 || [_appendToResponseElementID isEqualToString:@"0"];
_elementIDIsFirst=[_elementID length]==0 || [_elementID isEqualToString:@"0"];
if (_appendToResponseElementIDIsFirst!=_elementIDIsFirst)
{
_OK=[_appendToResponseElementID isEqualToString:_elementID];
};
if (!_OK)
{
NSString* _msg=[NSString stringWithFormat:@"In Class %@ (file %s line %d), id %@ in %@ is not the same than in appendToResponse %@",
NSStringFromClass(class_),
file_,
line_,
[context_ elementID],
NSStringFromSelector(method_),
_appendToResponseElementID];
NSAssert1(_OK,@"%@",_msg);
};
};
};
#endif
@end
//====================================================================
@ -44,6 +83,7 @@ BYTE ElementsMap_attributeElement = (BYTE)0x41;
-(void)takeValuesFromRequest:(GSWRequest*)request_
inContext:(GSWContext*)context_
{
GSWAssertCorrectElementID(context_);// Debug Only
//Does Nothing
};
@ -53,6 +93,8 @@ BYTE ElementsMap_attributeElement = (BYTE)0x41;
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request_
inContext:(GSWContext*)context_
{
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@ senderId=%@",[self class],[context_ elementID],[context_ senderID]);
GSWAssertCorrectElementID(context_);// Debug Only
//Does Nothing
return nil;
};
@ -63,9 +105,21 @@ BYTE ElementsMap_attributeElement = (BYTE)0x41;
-(void)appendToResponse:(GSWResponse*)response_
inContext:(GSWContext*)context_
{
GSWSaveAppendToResponseElementID(context_);//Debug Only
//Does Nothing
};
//--------------------------------------------------------------------
//NDFN
-(BOOL)prefixMatchSenderIDInContext:(GSWContext*)context_
{
NSString* _senderID=[context_ senderID];
NSString* _elementID=[context_ elementID];
NSDebugMLLog(@"gswdync",@"_senderID=%@",_senderID);
NSDebugMLLog(@"gswdync",@"_elementID=%@",_elementID);
return ([_elementID hasPrefix:_senderID] || [_senderID hasPrefix:_elementID]);
};
@end

View file

@ -38,6 +38,7 @@
-(void)incrementLastElementIDComponent;
-(void)appendZeroElementIDComponent;
-(void)appendElementIDComponent:(id)_element;
-(NSString*)parentElementIDString;//NDFN
#ifndef NDEBBUG
-(int)elementsNb;
#endif

View file

@ -27,6 +27,18 @@ static char rcsId[] = "$Id$";
//====================================================================
@implementation GSWElementIDString
//--------------------------------------------------------------------
-(id)copyWithZone:(NSZone*)zone
{
return [self mutableCopyWithZone:zone];
};
//--------------------------------------------------------------------
-(id)mutableCopyWithZone:(NSZone*)zone
{
return [[[self class] allocWithZone: zone] initWithString: self];
};
@end
//====================================================================
@ -118,6 +130,15 @@ static char rcsId[] = "$Id$";
LOGObjectFnStop();
};
//--------------------------------------------------------------------
//NDFN
-(NSString*)parentElementIDString
{
GSWElementIDString* _id=[[self copy] autorelease];
if ([self length]>0)
[_id deleteLastElementIDComponent];
return _id;
};
//--------------------------------------------------------------------
#ifndef NDEBBUG
-(int)elementsNb

View file

@ -81,7 +81,7 @@ static char rcsId[] = "$Id$";
//--------------------------------------------------------------------
-(void)appendToResponse:(GSWResponse*)response_
inContext:(GSWContext*)context_
inContext:(GSWContext*)context_
{
[super appendToResponse:response_
inContext:context_];
@ -91,6 +91,7 @@ static char rcsId[] = "$Id$";
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request_
inContext:(GSWContext*)context_
{
GSWAssertCorrectElementID(context_);// Debug Only
//Bypass GSWInput
return nil;
};
@ -102,6 +103,7 @@ static char rcsId[] = "$Id$";
//OK
BOOL _disabled=NO;
LOGObjectFnStartC("GSWFileUpload");
GSWAssertCorrectElementID(context_);// Debug Only
_disabled=[self disabledInContext:context_];
if (!_disabled)
{

View file

@ -203,6 +203,9 @@ static char rcsId[] = "$Id$";
#endif
LOGObjectFnStartC("GSWForm");
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
GSWSaveAppendToResponseElementID(context_);//Debug Only
#if !GSWEB_STRICT
_disabledInContext=[self disabledInContext:context_];
[context_ setInForm:!_disabledInContext];
@ -242,14 +245,20 @@ static char rcsId[] = "$Id$";
BOOL _multipleSubmit=NO;
int i=0;
LOGObjectFnStartC("GSWForm");
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@ senderId=%@",[self class],[context_ elementID],[context_ senderID]);
NS_DURING
{
GSWAssertCorrectElementID(context_);// Debug Only
_senderID=[context_ senderID];
_elementID=[context_ elementID];
if ([_senderID hasPrefix:_elementID]) //Avoid trying to find action if we are not the good form
if ([self prefixMatchSenderIDInContext:context_]) //Avoid trying to find action if we are not the good component
{
_isFormSubmited=[_elementID isEqualToString:_senderID];
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@ senderId=%@ _isFormSubmited=%s",
[self class],
[context_ elementID],
[context_ senderID],
(_isFormSubmited ? "YES" : "NO"));
#if !GSWEB_STRICT
if (_isFormSubmited && [self disabledInContext:context_])
_isFormSubmited=NO;
@ -260,6 +269,11 @@ static char rcsId[] = "$Id$";
[context_ _setFormSubmitted:YES];
_multipleSubmit=[self evaluateCondition:multipleSubmit
inContext:context_];
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@ senderId=%@ _multipleSubmit=%s",
[self class],
[context_ elementID],
[context_ senderID],
(_multipleSubmit ? "YES" : "NO"));
[context_ _setIsMultipleSubmitForm:_multipleSubmit];
};
[context_ appendZeroElementIDComponent];
@ -276,6 +290,10 @@ static char rcsId[] = "$Id$";
if ([context_ _wasActionInvoked])
{
[context_ _setIsMultipleSubmitForm:NO];
}
else
{
NSDebugMLLog0(@"gswdync",@"formSubmitted but no action was invoked!");
};
[context_ setInForm:NO];
[context_ _setFormSubmitted:NO];
@ -296,6 +314,13 @@ static char rcsId[] = "$Id$";
[localException raise];
}
NS_ENDHANDLER;
if (![context_ _wasActionInvoked] && [[context_ elementID] compare:[context_ senderID]]!=NSOrderedAscending)
{
LOGError(@"Action not invoked at the end of %@ (id=%@) senderId=%@",
[self class],
[context_ elementID],
[context_ senderID]);
};
LOGObjectFnStopC("GSWForm");
return _element;
};
@ -314,11 +339,12 @@ static char rcsId[] = "$Id$";
#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 ([_senderID hasPrefix:_elementID]) //Avoid taking values if we are not the good form
if ([self prefixMatchSenderIDInContext:context_]) //Avoid taking values if we are not the good form
{
_isFormSubmited=[_elementID isEqualToString:_senderID];
NSDebugMLLog(@"gswdync",@"_isFormSubmited=%d",(int)_isFormSubmited);

View file

@ -76,6 +76,7 @@ static char rcsId[] = "$Id$";
{
LOGObjectFnStart();
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
GSWSaveAppendToResponseElementID(context_);//Debug Only
[response_ appendContentString:string];
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context_ elementID]);
LOGObjectFnStop();

View file

@ -345,6 +345,7 @@ static char rcsId[] = "$Id$";
//OK
LOGObjectFnStartC("GSWHTMLDynamicElement");
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
GSWSaveAppendToResponseElementID(context_);//Debug Only
if ([elementsMap length]>0)
{
[self appendToResponse:response_
@ -505,7 +506,7 @@ static char rcsId[] = "$Id$";
LOGObjectFnStartC("GSWHTMLDynamicElement");
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
NSDebugMLLog(@"gswdync",@"_senderID=%@",[context_ senderID]);
NSDebugMLLog(@"gswdync",@"_elementID=%@",[context_ elementID]);
GSWAssertCorrectElementID(context_);// Debug Only
for(elementN=0;!_element && elementN<[elementsMap length];elementN++)
{
element=(BYTE)elements[elementN];
@ -586,8 +587,8 @@ static char rcsId[] = "$Id$";
LOGObjectFnStartC("GSWHTMLDynamicElement");
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
NSDebugMLLog(@"gswdync",@"_senderID=%@",[context_ senderID]);
NSDebugMLLog(@"gswdync",@"_elementID=%@",[context_ elementID]);
NSDebugMLLog(@"gswdync",@"Starting HTMLDyn TV ET=%@ id=%@",[self class],[context_ elementID]);
GSWAssertCorrectElementID(context_);// Debug Only
for(elementN=0;elementN<[elementsMap length];elementN++)
{
element=(BYTE)elements[elementN];

View file

@ -290,6 +290,7 @@ static char rcsId[] = "$Id$";
GSWRequest* _request=[context_ request];
BOOL _isFromClientComponent=[_request isFromClientComponent]; //bis repetitam
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
GSWSaveAppendToResponseElementID(context_);//Debug Only
if ([elementsMap length]>0)
{
[self appendToResponse:response_
@ -355,7 +356,8 @@ static char rcsId[] = "$Id$";
CONST BYTE* elements=[elementsMap bytes];
BYTE element=0;
int elementsN[3]={0,0,0};
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@ senderId=%@",[self class],[context_ elementID],[context_ senderID]);
GSWAssertCorrectElementID(context_);// Debug Only
for(elementN=0;!_element && elementN<[elementsMap length];elementN++)
{
element=(BYTE)elements[elementN];
@ -390,6 +392,7 @@ static char rcsId[] = "$Id$";
int elementsN[3]={0,0,0};
LOGObjectFnStart();
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
GSWAssertCorrectElementID(context_);// Debug Only
for(elementN=0;elementN<[elementsMap length];elementN++)
{
NSDebugMLLog(@"gswdync",@"elementN=%d",elementN);

View file

@ -226,7 +226,7 @@ static char rcsId[] = "$Id$";
#endif
LOGObjectFnStart();
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
NSDebugMLLog(@"gswdync",@"_elementID=%@",[context_ elementID]);
GSWSaveAppendToResponseElementID(context_);//Debug Only
if (disabled)
_disabled=[self evaluateCondition:disabled
inContext:context_];
@ -561,11 +561,10 @@ static char rcsId[] = "$Id$";
int elementsNb=[(GSWElementIDString*)[context_ elementID]elementsNb];
#endif
LOGObjectFnStart();
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@",[self class],[context_ elementID]);
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@ senderId=%@",[self class],[context_ elementID],[context_ senderID]);
GSWAssertCorrectElementID(context_);// Debug Only
_senderID=[context_ senderID];
NSDebugMLLog(@"gswdync",@"_senderID=%@",_senderID);
_elementID=[context_ elementID];
NSDebugMLLog(@"gswdync",@"_elementID=%@",_elementID);
if ([_elementID isEqualToString:_senderID])
{
GSWComponent* _component=[context_ component];

View file

@ -287,6 +287,7 @@ static char rcsId[] = "$Id$";
GSWRequest* _request=[context_ request];
BOOL _isFromClientComponent=[_request isFromClientComponent];
BOOL _disabledInContext=[self disabledInContext:context_];
GSWSaveAppendToResponseElementID(context_);//Debug Only
if (_disabledInContext)
{
//TODO
@ -308,6 +309,7 @@ static char rcsId[] = "$Id$";
inContext:(GSWContext*)context_
{
LOGObjectFnStart();
GSWAssertCorrectElementID(context_);// Debug Only
//Does nothing ?
LOGObjectFnStop();
};
@ -319,6 +321,8 @@ static char rcsId[] = "$Id$";
GSWElement* _element=nil;
BOOL _disabledInContext=NO;
LOGObjectFnStart();
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@ senderId=%@",[self class],[context_ elementID],[context_ senderID]);
GSWAssertCorrectElementID(context_);// Debug Only
_disabledInContext=[self disabledInContext:context_];
if (!_disabledInContext)
{

View file

@ -148,6 +148,7 @@ static char rcsId[] = "$Id$";
//OK
BOOL _disabledInContext=NO;
LOGObjectFnStartC("GSWInput");
GSWAssertCorrectElementID(context_);// Debug Only
_disabledInContext=[self disabledInContext:context_]; //return 0
if (!_disabledInContext)
{
@ -210,6 +211,7 @@ static char rcsId[] = "$Id$";
//OK
GSWComponent* _component=nil;
LOGObjectFnStartC("GSWInput");
GSWSaveAppendToResponseElementID(context_);//Debug Only
_component=[context_ component];
if (value)
{

View file

@ -55,6 +55,7 @@ static char rcsId[] = "$Id$";
-(void)takeValuesFromRequest:(GSWRequest*)request_
inContext:(GSWContext*)context_
{
GSWAssertCorrectElementID(context_);// Debug Only
//Does Nothing and don't call its parent GSWInput !
};

View file

@ -616,6 +616,7 @@ static char rcsId[] = "$Id$";
struct rusage _rusage;
int i=0;
LOGObjectFnStart();
//Use NSRealMemoryAvailable ??
for(i=0;i<2;i++)
{
memset(&_rusage,0,sizeof(_rusage));

View file

@ -84,6 +84,7 @@ static char rcsId[] = "$Id$";
{
//OK
LOGObjectFnStart();
GSWSaveAppendToResponseElementID(context_);//Debug Only
[super appendToResponse:response_
inContext:context_];
LOGObjectFnStop();
@ -97,8 +98,10 @@ static char rcsId[] = "$Id$";
GSWElement* _element=nil;
BOOL _disabled=NO;
LOGObjectFnStart();
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@ senderId=%@",[self class],[context_ elementID],[context_ senderID]);
NS_DURING
{
GSWAssertCorrectElementID(context_);// Debug Only
_disabled=[self disabledInContext:context_];
if (!_disabled)
{
@ -115,6 +118,10 @@ static char rcsId[] = "$Id$";
NSDebugMLLog(@"gswdync",@"_formValue=%@",_formValue);
if (_formValue)
_invoked=YES;
else
{
NSDebugMLLog(@"gswdync",@"[request_ formValueKeys]=%@",[request_ formValueKeys]);
};
}
else
_invoked=YES;
@ -155,6 +162,13 @@ static char rcsId[] = "$Id$";
[localException raise];
}
NS_ENDHANDLER;
if (![context_ _wasActionInvoked] && [[[context_ elementID] parentElementIDString] compare:[context_ senderID]]!=NSOrderedAscending)
{
LOGError(@"Action not invoked at the end of %@ (id=%@) senderId=%@",
[self class],
[context_ elementID],
[context_ senderID]);
};
LOGObjectFnStop();
return _element;
};
@ -164,6 +178,7 @@ static char rcsId[] = "$Id$";
inContext:(GSWContext*)context_
{
//Does Nothing ?
GSWAssertCorrectElementID(context_);// Debug Only
};
//--------------------------------------------------------------------

View file

@ -80,6 +80,7 @@ static char rcsId[] = "$Id$";
//OK
BOOL _disabled=NO;
LOGObjectFnStartC("GSWTextField");
GSWAssertCorrectElementID(context_);// Debug Only
_disabled=[self disabledInContext:context_];
if (!_disabled)
{
@ -105,13 +106,13 @@ static char rcsId[] = "$Id$";
{
NSException* _exception=nil;
NSString* _valueKeyPath=[value keyPath];
LOGException0(@"EOValidationException");
LOGException(@"EOValidationException _resultValue=%@ _valueKeyPath=%@",_resultValue,_valueKeyPath);
_exception=[NSException exceptionWithName:@"EOValidationException"
reason:_errorDscr /*_exceptionDscr*/
userInfo:[NSDictionary
dictionaryWithObjectsAndKeys:
@"EOValidatedObjectUserInfoKey",_resultValue,
@"EOValidatedPropertyUserInfoKey",_valueKeyPath,
(_resultValue ? _resultValue : @"nil"),@"EOValidatedObjectUserInfoKey",
_valueKeyPath,@"EOValidatedPropertyUserInfoKey",
nil,nil]];
[_component validationFailedWithException:_exception
value:_resultValue

View file

@ -39,6 +39,9 @@
#define IsStyle(__value,__style) ((((__value)&(__style))==(__style)) ? YES : NO)
#define IsNumberStyle(__value,__style) (((([__value unsignedIntValue])&(__style))==(__style)) ? YES : NO)
#define VOID_RCSID \
static void VoidUseRCSId() { rcsId[0]=0; };
typedef unsigned char BYTE;
#define allFrameworks tmpAllFrameworks