Hi there,
I have just bumped into a weird bug: my display group crashes with
“WODisplayGroup::insertObjectAtIndex() 3 beyond the bounds of 1“. Although the
WODisplayGroup documentation very clearly says
===
Invokes the createObject method of the dataSource and inserts the new object
into the dataSource (and into allObjects at newIndex) ...
===
(and there seems to be nothing in WOnder documentatin to contradict it for an
ERXDG) it looks like it uses the given index into displayedObjects (or possibly
filteredObjects at the ERX... level) instead? Does that make any sense, or must
there be some weird bug in my code?
The code at the moment looks like this
===
println "WHAT-THE $dg"
println "WHAT-THE all $dg.allObjects.count filter $dg.filteredObjects.count
display $dg.displayedObjects.count"
def eo=this.insertNewObjectAtIndex(dg.allObjects.count)
===
and causes
===
WHAT-THE <er.extensions.appserver.ERXDisplayGroup
dataSource=com.webobjects.eoaccess.EODatabaseDataSource@31a5755c
delegate=Class: 'com.webobjects.appserver.WODisplayGroup$Delegate' Object:
<null> sortOrdering=( <class com.webobjects.eocontrol.EOSortOrdering(title
compareAscending)> ) qualifier=(createdBy = (model.DBUser)'<DBUser@402461c
PK:1000005 Name:\'cl\' T:\'3\' /EC:31c6bc2f>') localKeys=( )
insertedObjectDefaultValues={createdBy = <DBUser@402461c PK:1000005 Name:'cl'
T:'3' /EC:31c6bc2f>; } numberOfObjectsPerBatch=0>
WHAT-THE all 3 filter 1 display 1
12:23:03.474 WARN <er.extensions.appserver.ERXComponentRequestHandler>:
Exception occurred while handling request:
com.webobjects.foundation.NSForwardException
[java.lang.IllegalArgumentException] WODisplayGroup::insertObjectAtIndex() 3
beyond the bounds of 1:java.lang.IllegalArgumentException:
WODisplayGroup::insertObjectAtIndex() 3 beyond the bounds of 1
//log:NSLog [WorkerThread0]
... ...
===
Does this make any sense? Of course I can easily replace the
"dg.allObjects.count" of mine by "dg.displayedObjects.count" to fix the
problem, but since it explicitly clashes with the documentation, I sort of fear
it might indicate some deep-hidden problem?
Thanks and all the best,
OC
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]