Re: cfscript looping over udf's

2005-06-23 Thread Sean Corfield
On 6/23/05, Brian Holder [EMAIL PROTECTED] wrote: function DrawRow(someNo, someAmt) { var rRow = ; var thisRow = SetValue(someNo, someAmt); for( i = 1; i lte ArrayLen(thisRow); i = i+1 ) { You forgot to var-declare i -- Sean A Corfield -- http://corfield.org/ Team Fusebox --

RE: cfscript looping over udf's

2005-06-23 Thread Ian Skinner
You need to var scope the 'i' variable in the function so it is local to the function, otherwise it is the same 'i' in the main loop thus funky, unintentional results occur. Scope those variables! -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA C

Re: cfscript looping over udf's

2005-06-23 Thread S . Isaac Dealey
You didn't declare i in DrawRow() with the var keyword -- that's your problem, since it's overwriting the variable i you're using to loop over the query... I also I don't see aRow declared anywhere... i.e. aRow = arrayNew(1)... don't know if that's a problem... And your setValue function could

Re: cfscript looping over udf's

2005-06-23 Thread Raymond Camden
Your UDF uses the loop variable, i. So does your main page call. You forgot to var scope the i in the UDF. That's the problem. On 6/23/05, Brian Holder [EMAIL PROTECTED] wrote: i am looping over a query - inside the loop, i am calling a udf that calls another udf... for( i = 1; i lte

Re: cfscript looping over udf's

2005-06-23 Thread Brian Holder
You didn't declare i in DrawRow() with the var keyword -- that's your problem, since it's overwriting the variable i you're using to loop over the query... duh - thanks everyone - i just changed the i to var j for more clarity and it works perfectly with the following code... for( i = 1; i lte