Dan, You're welcome.
To be honest though, as bizarre as it may seem, this behavior is pretty standard when the Iterator design pattern is implemented, irrespective of programming language. But I agree with you: it's a big pain, proper behavior or not. And I think most folks learn about it the hard way. That's how I did. Bayo ----- Original Message ---- From: Dan Sorensen <[EMAIL PROTECTED]> To: [email protected] Sent: Tuesday, November 28, 2006 5:09:59 PM Subject: RE: [Reactor for CF] Iterator getNext() question <!-- _filtered {font-family:Wingdings; panose-1:5 0 0 0 0 0 0 0 0 0;} _filtered {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0pt; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {color:blue; text-decoration:underline;} span.EmailStyle18 {font-family:Arial; color:navy;} _filtered { margin:72.0pt 90.0pt 72.0pt 90.0pt;} div.Section1 {} --> Bayo’s solution worked perfectly. I’m just now testing Qasim’s solution as well. Is there a compelling reason to choose one solution over the other, or is it a case where I pick one and go with it? In any case, I wanted to thank you both very much; this has saved me many hours of additional confusion. J Finally, is there somewhere among the Reactor pages where I should document this issue and solution for others down the road? Thanks again, Dan From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Qasim Rasheed Sent: Tuesday, November 28, 2006 12:39 PM To: [email protected] Subject: Re: [Reactor for CF] Iterator getNext() question I have used this technique <cfloop condition="#iterator.hasMore()#"> <cfset iterator.getAt(1).delete( useTransaction=false ) /> </cfloop> HTH! Qasim On 11/28/06, bayo <[EMAIL PROTECTED]> wrote: Dan, To get around this behavior, call myIterator.resetIndex() after every deletion (once per loop iteration). Bayo -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Reactor for ColdFusion Mailing List [email protected] Archives at: http://www.mail-archive.com/reactor%40doughughes.net/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
