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 lt

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 q

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 be

RE: cfscript looping over udf's

2005-06-23 Thread Ian Skinner
Sacramento, CA "C code. C code run. Run code run. Please!" - Cynthia Dunning -Original Message- From: Brian Holder [mailto:[EMAIL PROTECTED] Sent: Thursday, June 23, 2005 9:27 AM To: CF-Talk Subject: cfscript looping over udf's i am looping o

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

cfscript looping over udf's

2005-06-23 Thread Brian Holder
> function SetValue(someNo, someAmt) { oops - that should read... function SetValue(someNo, someAmt) { var aRow = ArrayNew(1); ArraySet(variables.aRow, 1, 5, 0); // switch/case statements return aRow; } ~| Log

cfscript looping over udf's

2005-06-23 Thread Brian Holder
i am looping over a query - inside the loop, i am calling a udf that calls another udf... for( i = 1; i lte qQuery.RecordCount; i = i+1 ) { WriteOutput(DrawRow(qQuery.colA[i]), Trim(qQuery.colB[i]))); } function DrawRow(someNo, someAmt) { var rRow = ""; var thisRow = SetVa