Hi,

Ian Joyner wrote:
There is one issue I have found – Iterator does not cause faults to be loaded. Thus if you use:

        Iterator <EOGenericRecord> t = an_array.iterator ()

you will get nothing, whereas the Enumeration form works fine:

        Enumeration <EOGenericRecord> e = an_array.objectEnumerator ()

So don't update your enumerations to the new (cleaner and less verbose) iterator until this problem is fixed. At least the generic form works with Enumeration so those horrible type casts disappear.


It seems faults are fired on toArray(), objects() and mutableClone() NSArray interface calls. So preliminary tests seems to allow Java 5 enhanced for loop usage like this:

for(Object object : object.toManyRelationship().toArray()) {
        ...
}

Unfortunately, WebObjects classes dont use generics, so you still have to type cast objects. :-(

Can someone confirms that using Java 5 enhanced loop in that way is safe?


--
Francis Labrie
Saint-Bruno-de-Montarville, Québec, Canada

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Reply via email to