I'll have to check again to be 100% sure, but I believe the value is "".


-----Original Message-----
From: Patrick Santora [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 15, 2008 8:45 AM
To: CF-Talk
Subject: Re: <cfscript> loop versus <cfloop>

I would check to see what the argument value for CHILDID is prior to
using
getDepth and make sure it is numeric. Your answer might be there.

I believe the variable you want to verify is
"qNav[getChildOfField()][i]".

On Tue, Apr 15, 2008 at 6:39 AM, Jason Durham <[EMAIL PROTECTED]>
wrote:

> The variable used in the cfloop is an "i",  Outlook changed the case
of
> it automagically.
>
> Here is a copy of the function using cfscript syntax that works
> flawlessly (written by Matt Quackenbush)...
> http://cfm.pastebin.com/d7595c18e
>
> Here is a copy of my re-write using <cfloop>...
> http://cfm.pastebin.com/m24328359
>
> The error the <cfloop> version results in....
> The CHILDID argument passed to the getDepth function is not of type
> numeric.
>
> I've verified that the function works for several iterations but fails
> on the 4th or 5th time through.  They are both using the same external
> methods [getDepth(),getParent(),getSubs()].
>
> -----Original Message-----
> From: Patrick Santora [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 15, 2008 8:30 AM
> To: CF-Talk
> Subject: Re: <cfscript> loop versus <cfloop>
>
> The syntax looks correct, what is the error you are getting?
>
> On Tue, Apr 15, 2008 at 6:22 AM, Jason Durham <[EMAIL PROTECTED]>
> wrote:
>
> > Thank you Dominic and Patrick for your suggestions.  In both cases,
> "i"
> > is var scoped just before the loops.
> >
> > The version with <cfloop> is the one that's giving me trouble.
> Perhaps
> > it's not in the loop syntax.  I've gone character by character
> comparing
> > the rest of the code in each function and they appear identical.
> >
> > -----Original Message-----
> > From: Patrick Santora [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, April 15, 2008 8:18 AM
> > To: CF-Talk
> > Subject: Re: <cfscript> loop versus <cfloop>
> >
> > you need to declare "i" via the script approach. cfloop does a basic
> > declaration for you. the for loop does not.
> >
> > NOTE: if this loop is within a cffunction then ensure you have
scoped
> i
> > correctly (place "var i = 1" above the loop)
> >
> > or (i = 1; i LTE qNav.recordCount; i=i+1) {
> >
> >               .........
> >
> > }
> >
> > -Pat
> > http://patweb99.avatu.com
> >
> > On Tue, Apr 15, 2008 at 6:08 AM, Jason Durham <[EMAIL PROTECTED]>
> > wrote:
> >
> > > I'm having a hard time tracking down the source of an error I'm
> > > receiving from a recursive function.  Are these loops identical?
> > >
> > >
> > >
> > > <cfloop from="1" to="#qNav.recordCount#" index="I">
> > >
> > >                ........
> > >
> > > </cfloop>
> > >
> > >
> > >
> > >
> > >
> > > for (; i LTE qNav.recordCount; i=i+1) {
> > >
> > >                .........
> > >
> > > }
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
>
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303410
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to