From f938deff69a86aa900b969947ba9a261ff71ea92 Mon Sep 17 00:00:00 2001 From: mirko Date: Fri, 24 Nov 2000 09:32:34 +0000 Subject: [PATCH] * GSWeb.framework/GSWDisplayGroup.m ([GSWDisplayGroup -setCurrentBatchIndex:]): fixed index out of bound. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@8195 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ GSWeb.framework/GSWDisplayGroup.m | 32 ++++++++++++++++++------------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index e3a5500..183f724 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-11-24 Mirko Viviani + + * GSWeb.framework/GSWDisplayGroup.m ([GSWDisplayGroup + -setCurrentBatchIndex:]): fixed index out of bound. + 2000-11-04 Manuel Guesdon * GSWeb.framework/GSWElementIDString.[hm]: fix bug diff --git a/GSWeb.framework/GSWDisplayGroup.m b/GSWeb.framework/GSWDisplayGroup.m index c74af2f..cde6b76 100644 --- a/GSWeb.framework/GSWDisplayGroup.m +++ b/GSWeb.framework/GSWDisplayGroup.m @@ -78,8 +78,8 @@ static char rcsId[] = "$Id$"; { /* Description: - --[1] Dumping object 0x1a84d20 of Class EOKeyValueUnarchiver - _propertyList=NSDictionary * object:0x1057850 Description:{ + --[1] Dumping object 0x1a84d20 of Class EOKeyValueUnarchiver + _propertyList=NSDictionary * object:0x1057850 Description:{ class = WODisplayGroup; dataSource = { class = EODatabaseDataSource; @@ -90,12 +90,12 @@ Description: _numberOfObjectsPerBatch = 10; selectsFirstObjectAfterFetch = YES; } - _parent=id object:0x0 Description:*nil* - _nextParent=id object:0x0 Description:*nil* - _allUnarchivedObjects=NSMutableArray * object:0x1a85920 Description:() - _delegate=id object:0x1a84ff0 Description: - _awakenedObjects=struct ? {...} * PTR - isa=Class Class:EOKeyValueUnarchiver + _parent=id object:0x0 Description:*nil* + _nextParent=id object:0x0 Description:*nil* + _allUnarchivedObjects=NSMutableArray * object:0x1a85920 Description:() + _delegate=id object:0x1a84ff0 Description: + _awakenedObjects=struct ? {...} * PTR + isa=Class Class:EOKeyValueUnarchiver */ if ((self=[self init])) @@ -751,17 +751,21 @@ Description: - (id)fetch { BOOL fetch = YES; + LOGObjectFnStart(); if(_delegateRespondsTo.shouldFetchObjects == YES) fetch = [delegate displayGroupShouldFetch:self]; + NSDebugMLog(@"fetch=%d",(int)fetch); if(fetch) { - NSArray* objects=nil; + NSArray *objects=nil; + NSDebugMLog(@"_dataSource=%@",_dataSource); - objects=[_dataSource fetchObjects]; + + objects = [_dataSource fetchObjects]; NSDebugMLog(@"objects=%@",objects); [self setObjectArray:objects]; @@ -770,6 +774,7 @@ Description: didFetchObjects:_allObjects]; }; LOGObjectFnStop(); + return nil;//FIXME } @@ -894,6 +899,7 @@ Description: atIndex:(unsigned)index { BOOL insert = YES; + LOGObjectFnStart(); if(_delegateRespondsTo.shouldInsertObject == YES) insert = [delegate displayGroup:self @@ -1419,9 +1425,9 @@ Description: if(index_ > batchCount) index_ = 1; - if(!_numberOfObjectsPerBatch) - num = [_allObjects count]; - else + num = [_allObjects count]; + + if(_numberOfObjectsPerBatch && _numberOfObjectsPerBatch < num) num = _numberOfObjectsPerBatch; if(num)