> The return from the findNumbers() method has an iterator() method. So it > seems to me I should be able to loop and dump the matched objects, with > something like: > > <cfloop condition="result.iterator().hasNext()"> > <cfdump var="#result.iterator().next()#"> > </cfloop> > > However, this creates what appears to be an infinite loop. I'm guessing > it's because the loop isn't really looping through the iterator's > collection, but rather simply reading a static "true" from the hasNext() > initial value, and always dumping the first entry in the iterator's > collection.
What happens if you just rewrite the loop so that you check hasNext() within the body of the loop and exit the loop if there's no next? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357283 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

