Hi guys,
I think I'm getting a corrupt application scope problem.
The CF error is:
The element at position 3 cannot be found. LINE 411
LINE 411 is:
#application.rews.timePeriods[X].name# (it's in a loop so X would have
been equal to 3).
Applicatio
Hey guys,
The company I work for has a ColdFusion function that's being stored in the
application scope.
This function is used to pull translated text which changes based off of the
users current country that they selected. An issue we've been having however
is that on occasions we will run i
Matthew Chambers wrote:
>
> application.rews.timePeriods[1] = StructNew();
You might try using :
arrayAppend(application.rews.timePeriods, structNew());
Or... create the struct first... ie
tmpStruct = structNew()
tmpStruct.xxx = val;
It's also worth asking if you're doing this on EVERY page load or only
on application initilization.. ie...
if (not isDefined("application.rews") {
// set vars here
}
~|
Introducing the Fusion
Do you think this could have anything to do with the fact that this
function
is being stored in the application scope?
===
Yes, it has everything to do with that. You need to var EVERY variable
used in that function. Otherwise it is shared by everyone calling your
code at the exact same ti
",
arguments[varName])>
From: b...@bradwood.com
Sent: Wednesday, June 17, 2009 3:38 PM
To: "cf-talk"
Subject: RE: Application Scope Problem
Do you think this could have anything to
;?
Do you mean referencing the scope in the cfargument tag?
Like...
Instead of...
Thanks!
-Original Message-
From: Jason Fisher [mailto:ja...@wanax.com]
Sent: Wednesday, June 17, 2009 3:42 PM
To: cf-talk
Subject: RE: Application Scope Problem
Completely agree with Brad.
t;? Do you mean referencing the scope in the cfargument tag?
Like...
Instead of...
Thanks!
-Original Message-
From: Jason Fisher [mailto:ja...@wanax.com]
Sent: Wednesday, June 17, 2009 3:42 PM
To: cf-talk
Subject: RE: Application Scope Problem
Completely agree with Brad.
: RE: Application Scope Problem
Has anyone else experienced this issue before with the application
scope? So if I ripped this out of the application scope you think it the
issue I am having would be fixed correct?
Also, please explain what you mean by ensuring that the arguments
parameters aren
How are you setting the component in the app scope?
> -Original Message-
> From: Dawson, Michael [mailto:m...@evansville.edu]
> Sent: 18 June 2009 14:20
> To: cf-talk
> Subject: RE: Application Scope Problem
>
>
> We have had instances where a component, s
"Sticky", meaning that a variable holds the same value across multiple
calls, because it's in the application scope, and therefore shared across
all users of that application.
The 'arguments' scope should be used within the body of the function, not
the CFARGUMENT tag. So, this is fine:
lookup(placeholder="testtext.69EE0E03",language=requ
est.current_lang)#
-Original Message-
From: Adrian Lynch [mailto:cont...@adrianlynch.co.uk]
Sent: Thursday, June 18, 2009 9:43 AM
To: cf-talk
Subject: RE: Application Scope Problem
How are you setting th
rom: Paul Alkema [mailto:paulalkemadesi...@gmail.com]
> Sent: 18 June 2009 14:53
> To: cf-talk
> Subject: RE: Application Scope Problem
>
>
> Code Example
>
> application.translator=createObject("component",'packages.translator.tr
> ansla
> tor')>
&
fails without any explanation.
Thanks,
Mike
-Original Message-
From: Adrian Lynch [mailto:cont...@adrianlynch.co.uk]
Sent: Thursday, June 18, 2009 8:43 AM
To: cf-talk
Subject: RE: Application Scope Problem
How are you setting the component in the app
>
>
>
> Thanks!
> -Original Message-
> From: Jason Fisher [mailto:ja...@wanax.com]
> Sent: Wednesday, June 17, 2009 3:42 PM
> To: cf-talk
> Subject: RE: Application Scope Problem
>
>
> Completely agree with Brad. Also wouldn't hurt to ensure that
alk
Subject: Re: Application Scope Problem
It has nothing to do with Application scope and everything to do with poorly
written code, sorry to be blunt but that's the issue. As was said all
variables you that you want to be local to that method need to be var'ed.
Currently you ar
the problem. Also don't worry
> about the bluntness, heh, I didn't write this code, I just inherited it. :)
>
> Paul
>
> -Original Message-
> From: Adam Haskell [mailto:a.hask...@gmail.com]
> Sent: Friday, June 19, 2009 2:55 PM
> To: cf-talk
>
Additionally, you can take a look at this blog post for a better understanding
of why you need to "var" a variable.
http://www.schierberl.com/cfblog/index.cfm/2008/7/21/Thread-safety-and-the-var-scope--live-example
>This little tool can help you find what variables need to be put into
>the "va
18 matches
Mail list logo