mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-04-23 15:33:43 +00:00
2001-10-27 Manuel Guesdon <mguesdon@orange-concept.com>
Applied patch from Turbocat (www.turbocat.de): gsw_26_oct_2001.patch except o GDL2 ifdef in GSWDisplayGroup.h o Turbocat additions in GSWTextField.m * GSWAdaptors/Apache/GNUmakefile: changes in APXS * GSWAdaptors/common/GSWApp.c: in GSWAppInfo_MakeDictKeyName, take care of buffer overflow * GSWeb.framework/GSWComponent.m: implement validationFailedWithException:value:keyPath: * GSWeb.framework/GSWDeployedBundle.m: commented #include <pthread.h> * GSWeb.framework/GSWDisplayGroup.m: select after fetch in -fetch various changes * GSWeb.framework/GSWKeyValueAssociation.m: traces * GSWeb.framework/GSWApplication.m: Traces * GSWeb.framework/GSWAssociation: GDL2 changes o removed special case for returned value of type GSMutableArray o GDL2 value validation * GSWeb.framework/GSWImageButton.m: rewrite of invokeActionForRequest:inContext: * GSWeb.framework/GSWDefaultAdaptorThread.m: traces * GSWeb.framework/GSWTemplateParserXML.m: traces * GSWeb.framework/NSString+Trimming.m: Handle EONull/NSNull git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@11256 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ee56247d12
commit
d6c8d24523
16 changed files with 338 additions and 79 deletions
21
ChangeLog
21
ChangeLog
|
@ -1,3 +1,24 @@
|
|||
2001-10-27 Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Applied patch from Turbocat (www.turbocat.de): gsw_26_oct_2001.patch
|
||||
except
|
||||
o GDL2 ifdef in GSWDisplayGroup.h
|
||||
o Turbocat additions in GSWTextField.m
|
||||
* GSWAdaptors/Apache/GNUmakefile: changes in APXS
|
||||
* GSWAdaptors/common/GSWApp.c: in GSWAppInfo_MakeDictKeyName, take care of buffer overflow
|
||||
* GSWeb.framework/GSWComponent.m: implement validationFailedWithException:value:keyPath:
|
||||
* GSWeb.framework/GSWDeployedBundle.m: commented #include <pthread.h>
|
||||
* GSWeb.framework/GSWDisplayGroup.m: select after fetch in -fetch
|
||||
various changes
|
||||
* GSWeb.framework/GSWKeyValueAssociation.m: traces
|
||||
* GSWeb.framework/GSWApplication.m: Traces
|
||||
* GSWeb.framework/GSWAssociation: GDL2 changes
|
||||
o removed special case for returned value of type GSMutableArray
|
||||
o GDL2 value validation
|
||||
* GSWeb.framework/GSWImageButton.m: rewrite of invokeActionForRequest:inContext:
|
||||
* GSWeb.framework/GSWDefaultAdaptorThread.m: traces
|
||||
* GSWeb.framework/GSWTemplateParserXML.m: traces
|
||||
* GSWeb.framework/NSString+Trimming.m: Handle EONull/NSNull
|
||||
|
||||
2001-10-25 Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
Applied patch from Turbocat (www.turbocat.de): GSWPatch_04-JUL_2001.diff
|
||||
except GSWeb.framework/GSWInput.m/.h one (have to verify coherence of it)
|
||||
|
|
|
@ -44,7 +44,7 @@ endif
|
|||
|
||||
APACHEHEADERS := -I/usr/apache/include -I/usr/include/apache -I/usr/local/include/apache -I/usr/lib/apache/include -I/usr/local/apache/include -I/usr/local/include
|
||||
|
||||
APXS := $(APXS) -l PropList -L/usr/local/lib
|
||||
APXS := $(APXS) -lPropList -L/usr/local/lib -L/usr/pkg/lib
|
||||
|
||||
SRCROOT = ..
|
||||
DSTROOT = .
|
||||
|
|
|
@ -206,9 +206,10 @@ char* GSWAppInfo_MakeDictKeyName(char* pszName, int iInstance)
|
|||
{
|
||||
char *name = NULL;
|
||||
|
||||
if (name = calloc(1,30)) {
|
||||
if (name = calloc(1,50)) {
|
||||
if (pszName) {
|
||||
strcpy(name, pszName);
|
||||
strncpy(name, pszName,45);
|
||||
name[45]=0;
|
||||
}
|
||||
sprintf(name + strlen(name), "%d", iInstance);
|
||||
|
||||
|
|
|
@ -63,11 +63,9 @@ void GSWApplicationDebugSetChange()
|
|||
NSString* _newStateString=nil;
|
||||
BOOL _change=NO;
|
||||
_debugSetConfigFilePath=[GSWApplication debugSetConfigFilePath];
|
||||
NSLog(@"_debugSetConfigFilePath=%@",_debugSetConfigFilePath);
|
||||
NSDebugFLog(@"_debugSetConfigFilePath=%@",_debugSetConfigFilePath);
|
||||
_newStateString=[NSString stringWithContentsOfFile:[GSWApplication debugSetConfigFilePath]];
|
||||
NSLog(@"_debugSet=%@",_debugSet);
|
||||
NSDebugFLog(@"_debugSet=%@",_debugSet);
|
||||
NSLog(@"_newStateString=%@",_newStateString);
|
||||
NSDebugFLog(@"_newStateString=%@",_newStateString);
|
||||
if (_newStateString)
|
||||
_change=![_newStateString isEqualToString:_prevStateString];
|
||||
|
|
|
@ -597,7 +597,11 @@ static NSMutableArray* associationsLogsHandlerClasses=nil;
|
|||
forKeyPath:(NSString*)keyPath_
|
||||
{
|
||||
id retValue=nil;
|
||||
#ifdef GDL2
|
||||
id EONullNull=[EONull null];
|
||||
#else
|
||||
id EONullNull=[NSNull null];
|
||||
#endif
|
||||
LOGClassFnStart();
|
||||
NSDebugMLLog(@"associations",@"GSWAssociation: keyPath_=%@ object_=%p",keyPath_,(void*)object_);
|
||||
if (keyPath_ && object_ && object_!=EONullNull)
|
||||
|
@ -657,47 +661,9 @@ static NSMutableArray* associationsLogsHandlerClasses=nil;
|
|||
{
|
||||
BOOL skipping = NO;
|
||||
NS_DURING
|
||||
/*
|
||||
//NSLog(@"#getIVarNamed");
|
||||
if (retValue) {
|
||||
//NSLog(@"class retValue before getIVarNamed : %s", object_get_class_name(retValue));
|
||||
//NSLog(@"description retValue : %@", [retValue description]);
|
||||
}
|
||||
|
||||
if ((retValue) && (strstr(object_get_class_name(retValue),"GSMutableArray") != NULL)) {
|
||||
|
||||
int counter;
|
||||
if ([_part isEqual:@"count"]) {
|
||||
SEL sel=0;
|
||||
NSMethodSignature *sig ;
|
||||
|
||||
NSLog(@"### retValue class is GSMutableArray (%@)", NSStringFromClass([retValue class]));
|
||||
sel = NSSelectorFromString(_part);
|
||||
NSLog(@"### selector = %d", (int)sel);
|
||||
NSLog(@"### %@", NSStringFromSelector(sel));
|
||||
if ([retValue respondsToSelector: sel] == NO) {
|
||||
NSLog(@"### GSMutableArray does not respond to '%@'", _part);
|
||||
} else {
|
||||
NSLog(@"### GSMutableArray responds to '%@'", _part);
|
||||
}
|
||||
sig = [retValue methodSignatureForSelector: sel];
|
||||
NSLog(@"### [sig numberOfArguments] = %d", [sig numberOfArguments]);
|
||||
|
||||
counter = [retValue count];
|
||||
NSLog(@"### count = %d", counter);
|
||||
skipping = YES;
|
||||
//retValue = [NSNumber numberWithInt:counter];
|
||||
}
|
||||
}
|
||||
|
||||
//if (!skipping)
|
||||
*/
|
||||
retValue=[retValue getIVarNamed:_part];
|
||||
/*
|
||||
if (retValue) {
|
||||
NSLog(@"class retValue after getIVarNamed : %s", object_get_class_name(retValue));
|
||||
}
|
||||
*/
|
||||
|
||||
NS_HANDLER
|
||||
NSLog(@"Attempt to get %@/%@ raised an exception (%@)",[retValue class],_part,localException);
|
||||
localException = [localException exceptionByAddingToUserInfoKey:@"Invalid Ivars/Methods" format:@"-[%@ %@]",[retValue class],_part];
|
||||
|
@ -711,7 +677,7 @@ static NSMutableArray* associationsLogsHandlerClasses=nil;
|
|||
if (retValue) {
|
||||
NSDebugMLLog(@"associations",@"retValue=%@",retValue);
|
||||
} else {
|
||||
NSLog(@"retValue=nil");
|
||||
NSDebugMLLog(@"associations",@"retValue=nil");
|
||||
}
|
||||
LOGClassFnStop();
|
||||
return retValue;
|
||||
|
@ -755,7 +721,7 @@ if (retValue) {
|
|||
if ([_part isEqualToString:GSASK_Class])
|
||||
{
|
||||
Class _class=Nil;
|
||||
NSLog(@"in GSASK_Class");
|
||||
|
||||
NSAssert2([keys count]>0,@"No class name for handler %@ in %@",
|
||||
GSASK_Class,
|
||||
keyPath_);
|
||||
|
@ -773,7 +739,6 @@ NSLog(@"in GSASK_Class");
|
|||
_object=nil;
|
||||
}
|
||||
else {
|
||||
//NSLog(@"before called getIVarNamed with _part = %@",_part);
|
||||
_object=[_object getIVarNamed:_part];
|
||||
}
|
||||
}
|
||||
|
@ -782,6 +747,27 @@ NSLog(@"in GSASK_Class");
|
|||
GSWLogAssertGood(_object);
|
||||
[_object setIVarNamed:_part
|
||||
withValue:value_];
|
||||
#ifdef GDL2
|
||||
// Turbocat
|
||||
if (object_ && [object_ isKindOfClass:[GSWComponent class]]) {
|
||||
NSException* _exp = [_object validateValue:&value_ forKey:_part];
|
||||
|
||||
if (_exp) {
|
||||
NSException* _exception=nil;
|
||||
|
||||
_exception=[NSException exceptionWithName:@"EOValidationException"
|
||||
reason:[_exp reason]
|
||||
userInfo:[NSDictionary
|
||||
dictionaryWithObjectsAndKeys:
|
||||
(value_ ? value_ : @"nil"),@"EOValidatedObjectUserInfoKey",
|
||||
keyPath_,@"EOValidatedPropertyUserInfoKey",
|
||||
nil,nil]];
|
||||
[object_ validationFailedWithException:_exception
|
||||
value:value_
|
||||
keyPath:keyPath_];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
_object=nil;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -25,7 +25,7 @@ static char rcsId[] = "$Id$";
|
|||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
|
||||
|
||||
#ifdef GDL2
|
||||
//====================================================================
|
||||
@interface GSWBundleUnarchiverDelegate : NSObject
|
||||
{
|
||||
|
@ -63,7 +63,7 @@ objectForReference:(NSString*)keyPath
|
|||
};
|
||||
|
||||
@end
|
||||
|
||||
#endif // GDL2
|
||||
//====================================================================
|
||||
@implementation GSWBundle
|
||||
|
||||
|
|
|
@ -1320,11 +1320,18 @@ associationsKeys:(NSArray*)_associationsKeys
|
|||
|
||||
//====================================================================
|
||||
@implementation GSWComponent (GSWLogging)
|
||||
//--------------------------------------------------------------------
|
||||
//Called when an Enterprise Object or formatter failed validation during an
|
||||
//assignment.
|
||||
//The default implementation ignores the error. Subclassers can override to
|
||||
// record the error and possibly return a different page for the current action.
|
||||
-(void)validationFailedWithException:(NSException*)_exception
|
||||
value:(id)_value
|
||||
keyPath:(id)_keyPath
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
// Does nothing
|
||||
LOGObjectFnStart();
|
||||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
|
@ -107,9 +107,13 @@ static char rcsId[] = "$Id$";
|
|||
ASSIGN(runDate,[NSDate date]);
|
||||
DESTROY(dispatchRequestDate);
|
||||
DESTROY(sendResponseDate);
|
||||
#ifdef DEBUG
|
||||
[GSWApplication statusLogWithFormat:@"Thread run START"];
|
||||
#endif
|
||||
pool=[NSAutoreleasePool new];
|
||||
#ifdef DEBUG
|
||||
[GSWApplication logWithFormat:@"pool allocated!"];
|
||||
#endif
|
||||
if (isMultiThread)
|
||||
{
|
||||
_threadDictionary=GSCurrentThreadDictionary();
|
||||
|
@ -209,9 +213,13 @@ static char rcsId[] = "$Id$";
|
|||
NSDebugMLog0(@"GSWDefaultAdaptorThread: run end");
|
||||
NSDebugMLLog(@"low",@"application:%@",application);
|
||||
LOGObjectFnStop();
|
||||
#ifdef DEBUG
|
||||
[GSWApplication statusLogWithFormat:@"threadWillExit START"];
|
||||
#endif
|
||||
[application threadWillExit];
|
||||
#ifdef DEBUG
|
||||
[GSWApplication statusLogWithFormat:@"threadWillExit STOP"];
|
||||
#endif
|
||||
if (isMultiThread)
|
||||
{
|
||||
NSAssert([NSThread isMultiThreaded],@"No MultiThread !");
|
||||
|
@ -219,7 +227,9 @@ static char rcsId[] = "$Id$";
|
|||
}
|
||||
else
|
||||
[self threadExited];
|
||||
#ifdef DEBUG
|
||||
[GSWApplication statusLogWithFormat:@"run STOP"];
|
||||
#endif
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
static char rcsId[] = "$Id$";
|
||||
|
||||
#include <GSWeb/GSWeb.h>
|
||||
#include <pthread.h>
|
||||
//#include <pthread.h>
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWDeployedBundle
|
||||
|
|
|
@ -843,6 +843,10 @@ Description: <EOKeyValueUnarchiver: 0x1a84d20>
|
|||
if(_delegateRespondsTo.didFetchObjects == YES)
|
||||
[delegate displayGroup:self
|
||||
didFetchObjects:_allObjects];
|
||||
// selection
|
||||
if ([self selectsFirstObjectAfterFetch] == YES) {
|
||||
[self setCurrentBatchIndex:1];
|
||||
}
|
||||
};
|
||||
LOGObjectFnStop();
|
||||
|
||||
|
@ -1513,7 +1517,8 @@ Description: <EOKeyValueUnarchiver: 0x1a84d20>
|
|||
i++)
|
||||
[_displayedObjects addObject:[_allObjects objectAtIndex:i]];
|
||||
|
||||
if(_flags.selectFirstObject == YES && [_selection count])
|
||||
//if(_flags.selectFirstObject == YES && [_selection count])
|
||||
if ((_flags.selectFirstObject == YES) && [_displayedObjects count])
|
||||
[self setSelectionIndexes:
|
||||
[NSArray arrayWithObject:
|
||||
[NSNumber numberWithUnsignedInt:
|
||||
|
@ -1718,6 +1723,7 @@ Description: <EOKeyValueUnarchiver: 0x1a84d20>
|
|||
{
|
||||
NSEnumerator *objsEnum;
|
||||
NSNumber *number;
|
||||
BOOL stop = NO;
|
||||
LOGObjectFnStart();
|
||||
|
||||
if(_delegateRespondsTo.shouldChangeSelection == YES)
|
||||
|
@ -1729,19 +1735,28 @@ Description: <EOKeyValueUnarchiver: 0x1a84d20>
|
|||
while((number = [objsEnum nextObject]))
|
||||
{
|
||||
NS_DURING
|
||||
[_allObjects objectAtIndex:[number unsignedIntValue]];
|
||||
{
|
||||
// check for objects
|
||||
[_allObjects objectAtIndex:[number unsignedIntValue]];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
//return NO;
|
||||
stop = YES;
|
||||
}
|
||||
return NO;
|
||||
NS_ENDHANDLER;
|
||||
}
|
||||
|
||||
if (stop) {
|
||||
return NO;
|
||||
}
|
||||
[_selectedObjects removeAllObjects];
|
||||
|
||||
objsEnum = [selection_ objectEnumerator];
|
||||
while((number = [objsEnum nextObject]))
|
||||
{
|
||||
[_selectedObjects
|
||||
addObject:[_allObjects objectAtIndex:[number unsignedIntValue]]];
|
||||
[_selectedObjects addObject:[_allObjects objectAtIndex:[number unsignedIntValue]]];
|
||||
}
|
||||
|
||||
ASSIGN(_selection, selection_);
|
||||
|
|
|
@ -314,7 +314,181 @@ static char rcsId[] = "$Id$";
|
|||
LOGObjectFnStop();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_
|
||||
{
|
||||
GSWElement* _element=nil;
|
||||
NSString* _senderID=nil;
|
||||
NSString* _elementID=nil;
|
||||
BOOL _disabledInContext=NO;
|
||||
BOOL _isInForm=NO;
|
||||
BOOL _XYValues=NO;
|
||||
BOOL _thisOne=NO;
|
||||
GSWComponent* _component=nil;
|
||||
int _x=0;
|
||||
int _y=0;
|
||||
LOGObjectFnStart();
|
||||
_component=[context_ component];
|
||||
[context_ appendZeroElementIDComponent];
|
||||
_senderID=[context_ senderID];
|
||||
NSDebugMLog(@"_senderID=%@",_senderID);
|
||||
_elementID=[context_ elementID];
|
||||
NSDebugMLog(@"_elementID=%@",_elementID);
|
||||
if ([_elementID isEqualToString:_senderID])
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
[context_ deleteLastElementIDComponent];
|
||||
_disabledInContext=[self disabledInContext:context_];
|
||||
if (!_disabledInContext)
|
||||
{
|
||||
_isInForm=[context_ isInForm];
|
||||
if (_isInForm)
|
||||
{
|
||||
BOOL _wasFormSubmitted=[context_ _wasFormSubmitted];
|
||||
if (_wasFormSubmitted)
|
||||
{
|
||||
NSString* _nameInContext=[self nameInContext:context_];
|
||||
NSString* _formValueX=[request_ formValueForKey:[NSString stringWithFormat:@"%@.x",
|
||||
_nameInContext]];
|
||||
NSString* _formValueY=[request_ formValueForKey:[NSString stringWithFormat:@"%@.y",
|
||||
_nameInContext]];
|
||||
NSDebugMLLog(@"gswdync",@"_formValueX=%@",_formValueX);
|
||||
NSDebugMLLog(@"gswdync",@"_formValueY=%@",_formValueY);
|
||||
if (_formValueX && _formValueY)
|
||||
{
|
||||
_x=[_formValueX intValue];
|
||||
_y=[_formValueY intValue];
|
||||
_XYValues=YES;
|
||||
_thisOne=YES;
|
||||
}
|
||||
else
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
_elementID=[context_ elementID];
|
||||
NSDebugMLog(@"_elementID=%@",_elementID);
|
||||
if ([_elementID isEqualToString:_senderID])
|
||||
{
|
||||
id _param=[request_ formValueForKey:GSWKey_IsmapCoords[GSWebNamingConv]];
|
||||
NSDebugMLLog(@"gswdync",@"_param=%@",_param);
|
||||
if (_param)
|
||||
{
|
||||
if ([_param ismapCoordx:&_x
|
||||
y:&_y])
|
||||
_XYValues=YES;
|
||||
else
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
};
|
||||
_thisOne=YES;
|
||||
};
|
||||
};
|
||||
if (_thisOne)
|
||||
{
|
||||
GSWAssociation* _actionAssociation=nil;
|
||||
NSArray* _regions=nil;
|
||||
if (imageMapFileName)
|
||||
{
|
||||
id _imageMapFileNameValue=[imageMapFileName valueInComponent:_component];
|
||||
NSString* _imageMapFilePath=[[context_ component]
|
||||
pathForResourceNamed:_imageMapFileNameValue
|
||||
ofType:nil];
|
||||
if (!_imageMapFilePath)
|
||||
{
|
||||
GSWResourceManager* _resourceManager=[[GSWApplication application]resourceManager];
|
||||
NSArray* _languages=[context_ languages];
|
||||
_imageMapFilePath=[_resourceManager pathForResourceNamed:_imageMapFileNameValue
|
||||
inFramework:nil
|
||||
languages:_languages];
|
||||
|
||||
};
|
||||
if (_imageMapFilePath)
|
||||
_regions=[GSWGeometricRegion geometricRegionsWithFile:_imageMapFilePath];
|
||||
else
|
||||
{
|
||||
NSDebugMLLog0(@"gswdync",@"GSWActiveImage No image Map.");
|
||||
};
|
||||
}
|
||||
else if (!WOStrictFlag && imageMapString)
|
||||
{
|
||||
id _imageMapValue=[imageMapString valueInComponent:_component];
|
||||
_regions=[GSWGeometricRegion geometricRegionsWithString:_imageMapValue];
|
||||
}
|
||||
else if (!WOStrictFlag && imageMapRegions)
|
||||
{
|
||||
_regions=[imageMapRegions valueInComponent:_component];
|
||||
};
|
||||
if (xAssoc)
|
||||
[xAssoc setValue:[NSNumber numberWithInt:_x]
|
||||
inComponent:_component];
|
||||
if (yAssoc)
|
||||
[yAssoc setValue:[NSNumber numberWithInt:_y]
|
||||
inComponent:_component];
|
||||
|
||||
_actionAssociation=[self hitTestX:_x
|
||||
y:_y
|
||||
inRegions:_regions];
|
||||
if (_actionAssociation)
|
||||
{
|
||||
[context_ _setActionInvoked:YES];
|
||||
_element=[_actionAssociation valueInComponent:_component];
|
||||
|
||||
if (_element && [_element isKindOfClass:[GSWComponent class]])
|
||||
{
|
||||
// call awakeInContext when _element is sleeping deeply
|
||||
[_element ensureAwakeInContext:context_];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* if (href)
|
||||
{
|
||||
[context_ _setActionInvoked:YES];
|
||||
//TODO redirect to href
|
||||
}
|
||||
else*/ if (action)
|
||||
{
|
||||
[context_ _setActionInvoked:YES];
|
||||
_element=[action valueInComponent:_component];
|
||||
|
||||
if (_element && [_element isKindOfClass:[GSWComponent class]])
|
||||
{
|
||||
// call awakeInContext when _element is sleeping deeply
|
||||
[_element ensureAwakeInContext:context_];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
NSDebugMLLog0(@"gswdync",@"GSWActiveImage Couldn't trigger action.");
|
||||
};
|
||||
};
|
||||
if (!_element)
|
||||
_element=[context_ page];
|
||||
}
|
||||
else
|
||||
_element=[super invokeActionForRequest:request_
|
||||
inContext:context_];
|
||||
}
|
||||
else
|
||||
_element=[super invokeActionForRequest:request_
|
||||
inContext:context_];
|
||||
LOGObjectFnStop();
|
||||
return _element;
|
||||
};
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
/*
|
||||
-(GSWElement*)invokeActionForRequest:(GSWRequest*)request_
|
||||
inContext:(GSWContext*)context_
|
||||
{
|
||||
|
@ -411,12 +585,12 @@ static char rcsId[] = "$Id$";
|
|||
} else {
|
||||
// call awakeInContext when _element is sleeping deeply
|
||||
[_element ensureAwakeInContext:context_];
|
||||
/*
|
||||
if (![_element context]) {
|
||||
NSDebugMLLog(@"gswdync",@"_element sleeps, awake it = %@",_element);
|
||||
[_element awakeInContext:context_];
|
||||
}
|
||||
*/
|
||||
//
|
||||
// if (![_element context]) {
|
||||
// NSDebugMLLog(@"gswdync",@"_element sleeps, awake it = %@",_element);
|
||||
// [_element awakeInContext:context_];
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -437,7 +611,7 @@ static char rcsId[] = "$Id$";
|
|||
LOGObjectFnStop();
|
||||
return _element;
|
||||
};
|
||||
|
||||
*/
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)frameworkNameInContext:(GSWContext*)context_
|
||||
{
|
||||
|
|
|
@ -59,7 +59,8 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
id retValue=nil;
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"associations",@"keyPath=%@ object_=%p",keyPath,(void*)object_);
|
||||
NSDebugMLLog(@"associations",@"keyPath=%@ ",keyPath);
|
||||
NSDebugMLLog(@"associations",@"object_=%@ ", object_);
|
||||
retValue=[GSWAssociation valueInObject:object_
|
||||
forKeyPath:keyPath];
|
||||
NSDebugMLLog(@"associations",@"retValue=%@ (%p) (class=%@)",
|
||||
|
@ -76,9 +77,11 @@ static char rcsId[] = "$Id$";
|
|||
inObject:(id)object_
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"associations",@"keyPath=%@ ",keyPath);
|
||||
NSDebugMLLog(@"associations",@"GSWAssociation: setValue:%@ (self=%@)",value_,self);
|
||||
NSDebugMLLog(@"associations",@"value_ class:%@",NSStringFromClass([value_ class]));
|
||||
NSDebugMLLog(@"associations",@"value_ String class:%@",NSStringFromClass([value_ class]));
|
||||
if (value_) {
|
||||
NSDebugMLLog(@"associations",@"value_ class:%@",NSStringFromClass([value_ class]));
|
||||
}
|
||||
//TODO (return something!)
|
||||
[object_ validateValue:&value_
|
||||
forKey:self];
|
||||
|
|
|
@ -215,7 +215,7 @@ xmlParserInputPtr GSWTemplateParserSAXHandler_ExternalLoader(const char *systemI
|
|||
NSString* externalContent=nil;
|
||||
xmlParserInputPtr result = 0;
|
||||
LOGObjectFnStart();
|
||||
NSLog(@"resolveEntity:%@ systemID:%@ inParserContext:%p\n",
|
||||
NSDebugMLog(@"resolveEntity:%@ systemID:%@ inParserContext:%p\n",
|
||||
publicIdEntity,
|
||||
systemIdEntity,
|
||||
lib);
|
||||
|
@ -234,7 +234,7 @@ xmlParserInputPtr GSWTemplateParserSAXHandler_ExternalLoader(const char *systemI
|
|||
pathForResource:resourceName
|
||||
ofType:@"dtd"
|
||||
inDirectory:@"DTDs"];
|
||||
NSLog(@"systemIdEntity: fileName=%@ for Resource:%@",fileName,resourceName);
|
||||
NSDebugMLog(@"systemIdEntity: fileName=%@ for Resource:%@",fileName,resourceName);
|
||||
if (fileName)
|
||||
{
|
||||
externalContent=[NSString stringWithContentsOfFile:fileName];
|
||||
|
@ -247,7 +247,7 @@ xmlParserInputPtr GSWTemplateParserSAXHandler_ExternalLoader(const char *systemI
|
|||
%attrs;
|
||||
>\n";
|
||||
// name NMTOKEN; #IMPLIED
|
||||
NSLog(@"gswebTag=\n%@",gswebTag);
|
||||
NSDebugMLog(@"gswebTag=\n%@",gswebTag);
|
||||
externalContent=[externalContent stringByAppendingString:gswebTag];
|
||||
|
||||
[[self class] setCachedDTDContent:externalContent
|
||||
|
@ -283,7 +283,7 @@ xmlParserInputPtr GSWTemplateParserSAXHandler_ExternalLoader(const char *systemI
|
|||
resourceName=@"xhtml1-frameset.dtd";
|
||||
else
|
||||
{
|
||||
NSLog(@"Unknown DTD: %@. Choose default: xhtml1-transitional.dtd",publicIdEntity);
|
||||
NSDebugMLog(@"Unknown DTD: %@. Choose default: xhtml1-transitional.dtd",publicIdEntity);
|
||||
resourceName=@"xhtml1-transitional.dtd"; // guess
|
||||
};
|
||||
if (resourceName)
|
||||
|
@ -294,7 +294,7 @@ xmlParserInputPtr GSWTemplateParserSAXHandler_ExternalLoader(const char *systemI
|
|||
pathForResource:resourceName
|
||||
ofType:@"dtd"
|
||||
inDirectory:@"DTDs"];
|
||||
NSLog(@"systemIdEntity: fileName=%@ for Resource:%@",fileName,publicIdEntity);
|
||||
NSDebugMLog(@"systemIdEntity: fileName=%@ for Resource:%@",fileName,publicIdEntity);
|
||||
if (fileName)
|
||||
{
|
||||
externalContent=[NSString stringWithContentsOfFile:fileName];
|
||||
|
@ -313,7 +313,7 @@ xmlParserInputPtr GSWTemplateParserSAXHandler_ExternalLoader(const char *systemI
|
|||
resourceName=@"xhtml-lat1.ent";
|
||||
else
|
||||
{
|
||||
NSLog(@"Unknown ENTITIES: %@",publicIdEntity);
|
||||
NSDebugMLog(@"Unknown ENTITIES: %@",publicIdEntity);
|
||||
};
|
||||
if (resourceName)
|
||||
{
|
||||
|
@ -323,7 +323,7 @@ xmlParserInputPtr GSWTemplateParserSAXHandler_ExternalLoader(const char *systemI
|
|||
pathForResource:resourceName
|
||||
ofType:@"ent"
|
||||
inDirectory:@"DTDs"];
|
||||
NSLog(@"systemIdEntity: fileName=%@ for Resource:%@",fileName,publicIdEntity);
|
||||
NSDebugMLog(@"systemIdEntity: fileName=%@ for Resource:%@",fileName,publicIdEntity);
|
||||
if (fileName)
|
||||
{
|
||||
externalContent=[NSString stringWithContentsOfFile:fileName];
|
||||
|
@ -332,17 +332,17 @@ xmlParserInputPtr GSWTemplateParserSAXHandler_ExternalLoader(const char *systemI
|
|||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"Unknown publicIdEntity %@",publicIdEntity);
|
||||
NSDebugMLog(@"Unknown publicIdEntity %@",publicIdEntity);
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"Don't know how to parse publicIdEntity %@",publicIdEntity);
|
||||
NSDebugMLog(@"Don't know how to parse publicIdEntity %@",publicIdEntity);
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"Don't know what to do with publicIdEntity %@",publicIdEntity);
|
||||
NSDebugMLog(@"Don't know what to do with publicIdEntity %@",publicIdEntity);
|
||||
};
|
||||
if (externalContent)
|
||||
[[self class] setCachedDTDContent:externalContent
|
||||
|
@ -354,7 +354,7 @@ xmlParserInputPtr GSWTemplateParserSAXHandler_ExternalLoader(const char *systemI
|
|||
result=xmlNewStringInputStream(lib,[externalContent cString]);
|
||||
};
|
||||
NSAssert2(result,@"Can't load external (publicIdEntity:%@ systemIdEntity:%@)",publicIdEntity,systemIdEntity);
|
||||
NSLog(@"LOADED: resolveEntity:%@ systemID:%@ inParserContext:%p\n",
|
||||
NSDebugMLog(@"LOADED: resolveEntity:%@ systemID:%@ inParserContext:%p\n",
|
||||
publicIdEntity,
|
||||
systemIdEntity,
|
||||
lib);
|
||||
|
|
|
@ -123,6 +123,12 @@ static char rcsId[] = "$Id$";
|
|||
_resultValue=_value;
|
||||
};
|
||||
NSDebugMLLog(@"gswdync",@"_resultValue=%@",_resultValue);
|
||||
|
||||
// Turbocat
|
||||
if ([self _isFormattedValueInComponent:_component equalToFormattedValue:_value]) {
|
||||
// does nothing, old formatted values are equal
|
||||
} else {
|
||||
|
||||
if (!WOStrictFlag)
|
||||
{
|
||||
NS_DURING
|
||||
|
@ -140,7 +146,7 @@ static char rcsId[] = "$Id$";
|
|||
else
|
||||
[value setValue:_resultValue
|
||||
inComponent:_component];
|
||||
|
||||
}
|
||||
};
|
||||
};
|
||||
LOGObjectFnStopC("GSWTextField");
|
||||
|
@ -225,3 +231,36 @@ static char rcsId[] = "$Id$";
|
|||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWTextField (TurbocatAdditions)
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
- (BOOL)_isFormattedValueInComponent:(GSWComponent *)_component equalToFormattedValue:(NSString *)newFormattedValue
|
||||
{
|
||||
id _valueValue=nil;
|
||||
id _formattedValue=nil;
|
||||
NSFormatter* _formatter=nil;
|
||||
|
||||
if (!newFormattedValue) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
// get own value
|
||||
_valueValue=[value valueInComponent:_component];
|
||||
_formatter=[self formatterForComponent:_component];
|
||||
if (!_formatter)
|
||||
{
|
||||
//NSLog(@"No Formatter in _isFormattedValueInComponent");
|
||||
_formattedValue=_valueValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
_formattedValue=[_formatter stringForObjectValue:_valueValue];
|
||||
};
|
||||
|
||||
if (_formattedValue && [newFormattedValue isEqualToString:_formattedValue]) {
|
||||
NSLog(@"### GSWTextField : are EQUAL ###");
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
|
|
@ -439,7 +439,7 @@ void IdToPData(const char* retType,id _value,void* pdata)
|
|||
Class _class=Nil;
|
||||
NSObjectIVarsAccess* _ivarAccess=nil;
|
||||
NSMutableDictionary* _classCache=nil;
|
||||
//LOGObjectFnStart();
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"low",@"getIVarNamed %@ in %p %@ (superClass:%@)",name_,self,[self class],[self superclass]);
|
||||
_class=[self class];
|
||||
_classCache=[objectIVarAccessCache_Get objectForKey:_class];
|
||||
|
|
|
@ -190,8 +190,13 @@ static char rcsId[] = "$Id$";
|
|||
{
|
||||
if ([object_ isKindOfClass:[NSString class]])
|
||||
_string=[[object_ copy] autorelease];
|
||||
#ifdef GDL2
|
||||
else if ([object_ isKindOfClass:[EONull class]])
|
||||
_string=@"";
|
||||
#else
|
||||
else if ([object_ isKindOfClass:[NSNull class]])
|
||||
_string=@"";
|
||||
#endif
|
||||
else if ([object_ respondsToSelector:@selector(stringValue)])
|
||||
_string=[object_ stringValue];
|
||||
else if ([object_ respondsToSelector:@selector(description)])
|
||||
|
|
Loading…
Reference in a new issue