2002-06-03 Manuel Guesdon <mguesdon@orange-concept.com>

* GSWeb.framework/GSWBundle.m:
		o use smartTakeValue:forKey: instead of takeValue:forKey:
	* GSWeb.framework/GSWAssociation.m:
		o use smartTakeValue:forKeyPath: instead of takeValue:forKeyPath:
	* GSWeb.framework/GSWComponent.m:
		o use smartTakeValue:forKey: instead of takeValue:forKey:
	* GSWeb.framework/GSWDisplayGroup.m:
		o changes in -description
		o logs
	* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.gswd:
		o added "reference"
	* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.html:
		o added "reference"
	* GSWExtensions.framework/French.lproj/GSWExceptionPage.gswc/GSWExceptionPage.html:
		o added "reference"
	* GSWExtensions.framework/GSWExceptionPage.gswc/GSWExceptionPage.h/.m:
		o added "reference"
	* GSWExtensionsGSW.framework/GSWFileUploadComponent.h/.m:
		o bug fixes
	* GSWExtensionsGSW.framework/GSWFileUploadComponent.gswc/GSWFileUploadComponent.gswd:
		o added Height & With parameters for images
	* GSWExtensionsGSW.framework/GSWFileUploadComponent.gswc/GSWFileUploadComponent.html:
		o added delete check box title
	* GSWeb.framework/GSWElement.m:
		o logs
	* GSWeb.framework/GSWFileUpload.m:
		o logs
	* GSWeb.framework/GSWRequest.m:
		o bug fix for uploaded files


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@13762 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mguesdon 2002-06-03 08:27:15 +00:00
parent 893540cdaa
commit 1a474bf60f
19 changed files with 179 additions and 58 deletions

View file

@ -763,7 +763,7 @@ static NSMutableArray* associationsLogsHandlerClasses=nil;
if (keyPath)
{
#if GDL2
[object takeValue:value
[object smartTakeValue:value
forKeyPath:keyPath];
#else
NSMutableArray* keys=[[keyPath_ componentsSeparatedByString:@"."] mutableCopy];

View file

@ -402,7 +402,7 @@ objectForReference:(NSString*)keyPath
variableValue,
variableValue,
[variableValue retainCount]);
[object_ takeValue:variableValue
[object_ smartTakeValue:variableValue
forKey:variableName];
NSDebugMLLog(@"bundles",@"AFT variableValue %p:%@ [RC=%d]",
variableValue,

View file

@ -430,8 +430,13 @@ associationsKeys:(NSArray*)associationsKeys
inComponent:self];
/*//MGNEW [self setIVarNamed:aKey
withValue:aValue];*/
#if GDL2 // GDL2 implementation
[self smartTakeValue:aValue
forKey:aKey];
#else
[self takeValue:aValue
forKey:aKey];
#endif
};
};
};
@ -838,7 +843,7 @@ associationsKeys:(NSArray*)associationsKeys
{
NS_DURING
{
[self takeValue:value_
[self smartTakeValue:value_
forKey:parentBindingName_];
}
NS_HANDLER;

View file

@ -135,37 +135,51 @@ Description: <EOKeyValueUnarchiver: 0x1a84d20>
-(NSString*)description
{
NSString* _dscr=nil;
NSString* dscr=nil;
GSWLogAssertGood(self);
NSDebugMLLog(@"gswdisplaygroup",@"GSWDisplayGroup description Self=%p",self);
_dscr=[NSString stringWithFormat:@"<%s %p - \n",
object_get_class_name(self),
(void*)self];
dscr=[NSString stringWithFormat:@"<%s %p - \n",
object_get_class_name(self),
(void*)self];
_dscr=[_dscr stringByAppendingFormat:@"numberOfObjectsPerBatch:[%d]\n",
_numberOfObjectsPerBatch];
_dscr=[_dscr stringByAppendingFormat:@"fetchesOnLoad:[%s]\n",
_flags.autoFetch ? "YES" : "NO"];
_dscr=[_dscr stringByAppendingFormat:@"validatesChangesImmediately:[%s]\n",
_flags.validateImmediately ? "YES" : "NO"];
_dscr=[_dscr stringByAppendingFormat:@"selectsFirstObjectAfterFetch:[%s]\n",
_flags.selectFirstObject ? "YES" : "NO"];
_dscr=[_dscr stringByAppendingFormat:@"localKeys:[%@]\n",
_localKeys];
_dscr=[_dscr stringByAppendingFormat:@"dataSource:[%@]\n",
_dataSource];
_dscr=[_dscr stringByAppendingFormat:@"sortOrdering:[%@]\n",
_sortOrdering];
_dscr=[_dscr stringByAppendingFormat:@"qualifier:[%@]\n",
_qualifier];
_dscr=[_dscr stringByAppendingFormat:@"formatForLikeQualifier:[%@]\n",
_defaultStringMatchFormat];
_dscr=[_dscr stringByAppendingFormat:@"insertedObjectDefaultValues:[%@]\n",
_insertedObjectDefaultValues];
_dscr=[_dscr stringByAppendingFormat:@"queryOperator:[%@]\n",
_queryOperator];
return _dscr;
dscr=[dscr stringByAppendingFormat:@"numberOfObjectsPerBatch:[%d]\n",
_numberOfObjectsPerBatch];
dscr=[dscr stringByAppendingFormat:@"fetchesOnLoad:[%s]\n",
_flags.autoFetch ? "YES" : "NO"];
dscr=[dscr stringByAppendingFormat:@"validatesChangesImmediately:[%s]\n",
_flags.validateImmediately ? "YES" : "NO"];
dscr=[dscr stringByAppendingFormat:@"selectsFirstObjectAfterFetch:[%s]\n",
_flags.selectFirstObject ? "YES" : "NO"];
dscr=[dscr stringByAppendingFormat:@"localKeys:[%@]\n",
_localKeys];
dscr=[dscr stringByAppendingFormat:@"dataSource:[%@]\n",
_dataSource];
dscr=[dscr stringByAppendingFormat:@"sortOrdering:[%@]\n",
_sortOrdering];
dscr=[dscr stringByAppendingFormat:@"qualifier:[%@]\n",
_qualifier];
dscr=[dscr stringByAppendingFormat:@"formatForLikeQualifier:[%@]\n",
_defaultStringMatchFormat];
dscr=[dscr stringByAppendingFormat:@"insertedObjectDefaultValues:[%@]\n",
_insertedObjectDefaultValues];
dscr=[dscr stringByAppendingFormat:@"queryOperator:[%@]\n",
_queryOperator];
dscr=[dscr stringByAppendingFormat:@"queryMatch:[%@]\n",
_queryMatch];
dscr=[dscr stringByAppendingFormat:@"queryMin:[%@]\n",
_queryMin];
dscr=[dscr stringByAppendingFormat:@"queryMax:[%@]\n",
_queryMax];
dscr=[dscr stringByAppendingFormat:@"queryOperator:[%@]\n",
_queryOperator];
dscr=[dscr stringByAppendingFormat:@"defaultStringMatchOperator:[%@]\n",
_defaultStringMatchOperator];
dscr=[dscr stringByAppendingFormat:@"defaultStringMatchFormat:[%@]\n",
_defaultStringMatchFormat];
dscr=[dscr stringByAppendingFormat:@"queryBindings:[%@]\n",
_queryBindings];
dscr=[dscr stringByAppendingString:@">"];
return dscr;
};
@ -1816,6 +1830,7 @@ self setSelectionIndexes:indexes of objects in objects? //ret 1
ofObject:masterObject];
if ([self fetchesOnLoad])
{
NSDebugMLLog(@"gswdisplaygroup",@"will fetch");
[self fetch];
};
};
@ -1844,6 +1859,7 @@ self setSelectionIndexes:indexes of objects in objects? //ret 1
//self selectedObjects
// self updateDisplayedObjects
NSDebugMLog(@"objects=%@",objects);
[_allObjects removeAllObjects];
[_allObjects addObjectsFromArray:objects];
@ -2053,6 +2069,7 @@ STOP ?
else
{
_batchIndex = [self batchCount];
NSDebugMLog(@"_batchIndex=%d",_batchIndex);
[self displayNextBatch];
}

View file

@ -66,6 +66,7 @@ extern BYTE ElementsMap_attributeElement;
#endif
-(NSString*)definitionName;
-(void)setDefinitionName:(NSString*)definitionName;
@end
#ifdef NDEBBUG

View file

@ -60,20 +60,22 @@ BYTE ElementsMap_attributeElement = (BYTE)0x41;
line:(int)line
{
LOGObjectFnStartC("GSWElement");
NSDebugMLog(@"In Object %p Class %@ definitionName=%@ _appendToResponseElementID=%@ [_appendToResponseElementID length]=%d",
/* NSDebugMLog(@"In Object %p Class %@ definitionName=%@ _appendToResponseElementID=%@ [_appendToResponseElementID length]=%d",
self,
[self class],
[self definitionName],
_appendToResponseElementID,[_appendToResponseElementID length]);
*/
[self assertIsElementIDInContext:context
method:method
file:file
line:line];
NSDebugMLog(@"In Object %p Class %@ definitionName=%@ _appendToResponseElementID=%@ [_appendToResponseElementID length]=%d",
/* NSDebugMLog(@"In Object %p Class %@ definitionName=%@ _appendToResponseElementID=%@ [_appendToResponseElementID length]=%d",
self,
[self class],
[self definitionName],
_appendToResponseElementID,[_appendToResponseElementID length]);
*/
if ([_appendToResponseElementID length]>0)
{
NSString* elementID=[context elementID];
@ -116,10 +118,11 @@ BYTE ElementsMap_attributeElement = (BYTE)0x41;
line:(int)line
{
LOGObjectFnStartC("GSWElement");
NSDebugMLog(@"self=%p definitionName=%@ _appendToResponseElementID=%@ %p / [context elementID]=%@",
/* NSDebugMLog(@"self=%p definitionName=%@ _appendToResponseElementID=%@ %p / [context elementID]=%@",
self,
[self definitionName],
_appendToResponseElementID,_appendToResponseElementID,[context elementID]);
*/
if (_appendToResponseElementID && [_appendToResponseElementID length]==0 && [[context elementID] length]>0)
{
NSString* msg=[NSString stringWithFormat:@"In Object %p Class %@ definitionName=%@ (file %s line %d), in %@ _appendToResponseElementID '%@' (%p) is not set",

View file

@ -145,8 +145,8 @@ static char rcsId[] = "$Id$";
if (fileDatasCount==1)
{
dataValue=[fileDatas objectAtIndex:0];
NSDebugMLLog(@"gswdync",@"dataValue (class=%@)=%@",
[dataValue class],dataValue);
NSDebugMLLog(@"gswdync",@"dataValue %p (class=%@)=%@",
dataValue,[dataValue class],dataValue);
if (dataValue)
{
if ([dataValue isKindOfClass:[NSData class]])
@ -161,12 +161,16 @@ static char rcsId[] = "$Id$";
if ([dataValue isKindOfClass:[NSString class]] && [dataValue length]==0)
{
LOGError(@"No Data: %@",dataValue);
NSDebugMLLog(@"gswdync",@"No Data: %p (class=%@)=%@",
dataValue,[dataValue class],dataValue);
dataValue=nil;
}
else
{
NSLog(@"content type request : %@",[request _contentType]);
NSLog(@"data class = %@",NSStringFromClass([dataValue class]));
NSDebugMLLog(@"gswdync",@"??Data: %p (class=%@)=%@",
dataValue,[dataValue class],dataValue);
/*if (![dataValue isMemberOfClass:[NSString class]]) {
ExceptionRaise(@"GSWFileUpload",
@"GSWFileUpload: bad data :%@",

View file

@ -378,6 +378,7 @@ static char rcsId[] = "$Id$";
else
{
//TODO
thisOne=YES;//??
};
};
}

View file

@ -1390,17 +1390,27 @@ method=%@, uri=%@, httpVersion=%@, headers=%@, content=%@, userInfo=%@, defaultF
if (!_headersEnd)
{
//TODO error
NSDebugMLog(@"Error");
}
else
{
NSDebugMLLog(@"requests",@"i=%d",i);
NSDebugMLLog(@"requests",@"i=%d _dataLength=%d _dataLength-i=%d",i,_dataLength,(_dataLength-i));
_data=[data_ subdataWithRange:NSMakeRange(i,_dataLength-i)];
//I'm not sure this is good but it avoid 2 bytes datas on an empty input type=file located t the end of the request)
//It may be better to deal with this few lines up, around (_headersEnd=YES;)
if ([_data length]==2)
{
const unsigned char* _bytes=(unsigned char*)[_data bytes];
if (_bytes[0]=='\r' && _bytes[1]=='\n')
_data=[NSData data];
};
};
_headers=[NSDictionary dictionaryWithDictionary:_headers];
_parsedData=[NSArray arrayWithObjects:_headers,_data,nil];
NSDebugMLLog(@"requests",@"_headers=%@",_headers);
NSDebugMLLog(@"requests",@"_data=%@",_data);
NSDebugMLLog(@"requests",@"_parsedData=%@",_parsedData);
NSDebugMLLog(@"requests",@"_data %p (length=%d)=%@",_data,[_data length],_data);
NSDebugMLLog(@"requests",@"_parsedData %p =%@",_parsedData,_parsedData);
};
LOGObjectFnStop();
return _parsedData;