I built a utility called VarScopeChecker that will examine your CFC code and report any local variables that should be var-scoped but are not. It will probably identify problem areas a lot faster than you'll be able to do by hand.
Here's a link to the utility: http://www.petry-johnson.com/blog/index.cfm?event=viewEntry&entryId=5
On 3/23/06, Peter J. Farrell <[EMAIL PROTECTED]> wrote:
Brian Peddle said the following on 3/23/2006 12:12 PM:
> Thanks ... my brain is fried from sifting through this code.
>
> No errors with what is suggested below.
>
> I did get an error on
>
> <cfset var stateEvents = structNew() />
>
After your cfargument, your code should look something like this:
<cfset var currentEvent = "" />
<cfset var prevEvent = "" />
<cfset var nextEvent = "" />
<cfset var eventHistory = "" />
<cfset var stateEvents = structNew() />
Best,
.Peter
P.s. All var must be at the top of the function - just after arguments
(if any) or CF will throw an error.
--
Peter J. Farrell :: Maestro Publishing
Member Team Mach-II :: Member Team Fusion
http://blog.maestropublishing.com
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
