* GSWeb.framework/GSWApplication.m (GSWApplicationMain): use NSLog to

print the exception.
* GSWeb.framework/GSWTransactionRecord.m ([GSWTransactionRecord
-initWithCoder:]), ([GSWTransactionRecord -encodeWithCoder:]): NSObject
does not support NSCoding. Fixed.
* GSWeb.framework/GSWPageDefElement.m ([GSWPageDefElement
-initWithCoder:]), ([GSWPageDefElement -encodeWithCoder:]): likewise.
* GSWeb.framework/GSWComponentDefinition.m ([GSWComponentDefinition
-initWithCoder:]), ([GSWComponentDefinition -encodeWithCoder:]):
likewise.
* GSWeb.framework/GSWTemplateParserXML.h|m: fixed libxml includes.

(patches by Sungjin Chun <ninja@linuxone.co.kr>)
* GSWeb.framework/GSWUtils.m: changed implementation of
NSMutableOrderedArray that now inherits from NSMutableArray.
* GSWeb.framework/GSWUtils.h (NSMutableArray): added ivar.
* GSWeb.framework/GSWMultiKeyDictionary.m: fixes.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@8873 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Mirko Viviani 2001-01-29 18:15:36 +00:00
parent e2461b2c2d
commit 49331081a5
11 changed files with 132 additions and 56 deletions

View file

@ -1,3 +1,23 @@
2001-01-29 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* GSWeb.framework/GSWApplication.m (GSWApplicationMain): use NSLog to
print the exception.
* GSWeb.framework/GSWTransactionRecord.m ([GSWTransactionRecord
-initWithCoder:]), ([GSWTransactionRecord -encodeWithCoder:]): NSObject
does not support NSCoding. Fixed.
* GSWeb.framework/GSWPageDefElement.m ([GSWPageDefElement
-initWithCoder:]), ([GSWPageDefElement -encodeWithCoder:]): likewise.
* GSWeb.framework/GSWComponentDefinition.m ([GSWComponentDefinition
-initWithCoder:]), ([GSWComponentDefinition -encodeWithCoder:]):
likewise.
* GSWeb.framework/GSWTemplateParserXML.h|m: fixed libxml includes.
(patches by Sungjin Chun <ninja@linuxone.co.kr>)
* GSWeb.framework/GSWUtils.m: changed implementation of
NSMutableOrderedArray that now inherits from NSMutableArray.
* GSWeb.framework/GSWUtils.h (NSMutableArray): added ivar.
* GSWeb.framework/GSWMultiKeyDictionary.m: fixes.
2000-12-08 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* GSWeb.framework/GSWDisplayGroup.m ([GSWDisplayGroup

View file

@ -256,12 +256,12 @@ int GSWApplicationMain(NSString* _applicationClassName,
// Make sure we pass all exceptions back to the requestor.
NS_HANDLER
{
NSDebugFLog(@"Can't create Application (Class:%@)- %@ %@ Name:%@ Reason:%@\n",
applicationClass,
localException,
[localException description],
[localException name],
[localException reason]);
NSLog(@"Can't create Application (Class:%@)- %@ %@ Name:%@ Reason:%@\n",
applicationClass,
localException,
[localException description],
[localException name],
[localException reason]);
result=-1;
}
NS_ENDHANDLER;

View file

@ -1176,7 +1176,6 @@ associationsKeys:(NSArray*)_associationsKeys
id _ret=nil;
LOGObjectFnStart();
NSDebugMLLog(@"gswcomponents", @"parentBindingName_=%@", parentBindingName_);
NSDebugMLLog(@"gswcomponents", @"parent=%p", (void*)parent);
if (parent)
{

View file

@ -81,7 +81,7 @@ static char rcsId[] = "$Id$";
//--------------------------------------------------------------------
-(id)initWithCoder:(NSCoder*)coder_
{
if ((self = [super initWithCoder:coder_]))
if ((self = [super init]))
{
[coder_ decodeValueOfObjCType:@encode(id)
at:&name];
@ -108,7 +108,6 @@ static char rcsId[] = "$Id$";
//--------------------------------------------------------------------
-(void)encodeWithCoder:(NSCoder*)coder_
{
[super encodeWithCoder: coder_];
[coder_ encodeObject:name];
[coder_ encodeObject:bundle];
[coder_ encodeObject:observers]; //TODOV

View file

@ -97,13 +97,23 @@ static char rcsId[] = "$Id$";
{
NSMutableArray* array=nil;
va_list ap;
id tmpId;
array = [NSMutableArray array];
va_start(ap, keys_);
array=[[[NSMutableArray alloc]initWithObjects:keys_
rest:ap]
autorelease];
tmpId = keys_;
do {
[array addObject:tmpId];
tmpId = va_arg(ap,id);
}
while ( tmpId );
va_end(ap);
[self setObject:object_
forKeysArray:array];
forKeysArray:array];
};
//------------------------------------------------------------------------------
@ -111,11 +121,20 @@ static char rcsId[] = "$Id$";
{
NSMutableArray* array=nil;
va_list ap;
id tmpId;
array = [NSMutableArray array];
va_start(ap, keys_);
array=[[[NSMutableArray alloc]initWithObjects:keys_
rest:ap]
autorelease];
tmpId = keys_;
do {
[array addObject:tmpId];
tmpId = va_arg(ap,id);
}
while ( tmpId );
va_end(ap);
return [self objectForKeysArray:array];
};

View file

@ -67,7 +67,7 @@ static char rcsId[] = "$Id$";
//--------------------------------------------------------------------
-(id)initWithCoder:(NSCoder*)coder_
{
if ((self = [super initWithCoder:coder_]))
if ((self = [super init]))
{
[coder_ decodeValueOfObjCType:@encode(id)
at:&elementName];
@ -82,7 +82,6 @@ static char rcsId[] = "$Id$";
//--------------------------------------------------------------------
-(void)encodeWithCoder:(NSCoder*)coder_
{
[super encodeWithCoder:coder_];
[coder_ encodeObject:elementName];
[coder_ encodeObject:className];
[coder_ encodeObject:associations];

View file

@ -28,10 +28,10 @@
#include "GSWTemplateParser.h"
#include <Foundation/GSXML.h>
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
#include <libxml/SAX.h>
#include <libxml/HTMLparser.h>
#include <parser.h>
#include <parserInternals.h>
#include <SAX.h>
#include <HTMLparser.h>
@class GSWTemplateParser;

View file

@ -24,7 +24,7 @@
static char rcsId[] = "$Id$";
#include <GSWeb/GSWeb.h>
#include <libxml/SAX.h>
#include <SAX.h>
extern xmlParserInputPtr xmlNewStringInputStream(xmlParserCtxtPtr ctxt,
const xmlChar *buffer);

View file

@ -67,7 +67,7 @@ static char rcsId[] = "$Id$";
//--------------------------------------------------------------------
-(id)initWithCoder:(NSCoder*)coder_
{
if ((self = [super initWithCoder:coder_]))
if ((self = [super init]))
{
[coder_ decodeValueOfObjCType:@encode(id)
at:&responsePage];
@ -80,7 +80,6 @@ static char rcsId[] = "$Id$";
//--------------------------------------------------------------------
-(void)encodeWithCoder:(NSCoder*)coder_
{
[super encodeWithCoder: coder_];
[coder_ encodeObject:responsePage];
[coder_ encodeObject:requestSignature];
};

View file

@ -241,8 +241,9 @@ extern NSData* HexStringToData(NSString* _string);
@end
//====================================================================
@interface NSMutableOrderedArray: NSGMutableArray
@interface NSMutableOrderedArray: NSMutableArray
{
NSMutableArray *array;
SEL compareSelector;
};
-(id)initWithCompareSelector:(SEL)compareSelector;

View file

@ -594,71 +594,110 @@ void ValidationExceptionRaiseFn0(const char *func,
@end
//====================================================================
@implementation NSMutableOrderedArray: NSGMutableArray
@implementation NSMutableOrderedArray: NSMutableArray
//--------------------------------------------------------------------
-(id)initWithCompareSelector:(SEL)compareSelector_
- (id)initWithCompareSelector:(SEL)compareSelector_
{
if ((self=[super init]))
{
compareSelector=compareSelector_;
};
{
array = [[NSMutableArray array] retain];
compareSelector=compareSelector_;
}
return self;
};
- (id)initWithCapacity:(unsigned)cap
{
array = [[NSMutableArray array] retain];
compareSelector=NULL;
return self;
}
- (unsigned)count
{
return [array count];
}
- (id)objectAtIndex:(unsigned)i
{
return [array objectAtIndex:i];
}
- (void)removeObjectAtIndex:(unsigned)i
{
[array removeObjectAtIndex:i];
}
- (void)release
{
[array release];
compareSelector=NULL;
[super dealloc];
}
//--------------------------------------------------------------------
-(void)addObject:(id)object_
{
//TODO better method
int i=0;
NSComparisonResult _result=NSOrderedSame;
for(i=0;_result!=NSOrderedDescending && i<[self count];i++)
{
_result=(NSComparisonResult)[object_ performSelector:compareSelector
withObject:[self objectAtIndex:i]];
if (_result==NSOrderedDescending)
[super insertObject:object_
atIndex:i];
};
for(i=0;_result!=NSOrderedDescending && i<[array count];i++)
{
_result=(NSComparisonResult)[object_ performSelector:compareSelector
withObject:[array objectAtIndex:i]];
if (_result==NSOrderedDescending)
[array insertObject:object_
atIndex:i];
};
if (_result!=NSOrderedDescending)
[super addObject:object_];
[array addObject:object_];
};
//--------------------------------------------------------------------
-(void)addObjectsFromArray:(NSArray*)array_
{
int i;
for(i=0;i<[array_ count];i++)
{
[self addObject:[array_ objectAtIndex:i]];
};
{
[array addObject:[array_ objectAtIndex:i]];
};
};
//--------------------------------------------------------------------
-(void)insertObject:(id)object_
atIndex:(unsigned int)index_
{
LOGException0(@"NSMutableOrderedArray doesn't support this fn");
[NSException raise:@"NSMutableOrderedArray"
format:@"NSMutableOrderedArray doesn't support %s",sel_get_name(_cmd)];
LOGException0(@"NSMutableOrderedArray doesn't support this fn");
[NSException raise:@"NSMutableOrderedArray"
format:@"NSMutableOrderedArray doesn't support %s",sel_get_name(_cmd)];
};
//--------------------------------------------------------------------
-(void)replaceObjectAtIndex:(unsigned int)index_
withObject:(id)object_
{
LOGException0(@"NSMutableOrderedArray doesn't support this fn");
[NSException raise:@"NSMutableOrderedArray"
format:@"NSMutableOrderedArray doesn't support %s",sel_get_name(_cmd)];
LOGException0(@"NSMutableOrderedArray doesn't support this fn");
[NSException raise:@"NSMutableOrderedArray"
format:@"NSMutableOrderedArray doesn't support %s",sel_get_name(_cmd)];
};
//--------------------------------------------------------------------
-(void)replaceObjectsInRange:(NSRange)range_
withObjectsFromArray:(NSArray*)array_
{
LOGException0(@"NSMutableOrderedArray doesn't support this fn");
[NSException raise:@"NSMutableOrderedArray"
format:@"NSMutableOrderedArray doesn't support %s",sel_get_name(_cmd)];
LOGException0(@"NSMutableOrderedArray doesn't support this fn");
[NSException raise:@"NSMutableOrderedArray"
format:@"NSMutableOrderedArray doesn't support %s",sel_get_name(_cmd)];
};
//--------------------------------------------------------------------
@ -666,15 +705,16 @@ void ValidationExceptionRaiseFn0(const char *func,
withObjectsFromArray:(NSArray*)array_
range:(NSRange)arrayRange_
{
LOGException0(@"NSMutableOrderedArray doesn't support this fn");
[NSException raise:@"NSMutableOrderedArray"
format:@"NSMutableOrderedArray doesn't support %s",sel_get_name(_cmd)];
LOGException0(@"NSMutableOrderedArray doesn't support this fn");
[NSException raise:@"NSMutableOrderedArray"
format:@"NSMutableOrderedArray doesn't support %s",sel_get_name(_cmd)];
};
//--------------------------------------------------------------------
-(void)setArray:(NSArray*)array_
{
[super setArray:[array_ sortedArrayUsingSelector:compareSelector]];
[array setArray:[array_ sortedArrayUsingSelector:compareSelector]];
};
@end