Application scope problem

2006-11-19 Thread Matthew Chambers
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

Application Scope Problem

2009-06-17 Thread Paul Alkema
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

Re: Application scope problem

2006-11-19 Thread Rick Root
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;

Re: Application scope problem

2006-11-19 Thread Rick Root
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

RE: Application Scope Problem

2009-06-17 Thread brad
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

RE: Application Scope Problem

2009-06-17 Thread Jason Fisher
", 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

RE: Application Scope Problem

2009-06-18 Thread Paul Alkema
;? 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

2009-06-18 Thread Paul Alkema
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

2009-06-18 Thread Dawson, Michael
: 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&#

RE: Application Scope Problem

2009-06-18 Thread Adrian Lynch
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

RE: Application Scope Problem

2009-06-18 Thread Jason Fisher
"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:

RE: Application Scope Problem

2009-06-18 Thread Paul Alkema
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

RE: Application Scope Problem

2009-06-18 Thread Adrian Lynch
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')> &

RE: Application Scope Problem

2009-06-18 Thread Dawson, Michael
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

Re: Application Scope Problem

2009-06-19 Thread Adam Haskell
> > > > 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

RE: Application Scope Problem

2009-06-19 Thread Paul Alkema
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

Re: Application Scope Problem

2009-06-19 Thread Eric Cobb
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 >

Re: Application Scope Problem

2009-06-21 Thread Mike Schierberl
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