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 var

Re: Application Scope Problem

2009-06-19 Thread Adam Haskell
: Application Scope Problem Completely agree with Brad. Also wouldn't hurt to ensure that the arguments parameters aren't sticky, by referencing the scope of 'language' and 'placeholder' as appropriate. cffunction access=public name=lookup returntype=string output=no hint=Returns the text

RE: Application Scope Problem

2009-06-19 Thread Paul Alkema
: 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 are not doing this so those

Re: Application Scope Problem

2009-06-19 Thread Eric Cobb
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 Subject: Re: Application Scope Problem It has nothing to do

RE: Application Scope Problem

2009-06-18 Thread Paul Alkema
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 the arguments parameters aren't sticky, by referencing

RE: Application Scope Problem

2009-06-18 Thread Paul Alkema
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 the arguments parameters aren't sticky, by referencing

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't

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, stored in the application scope, could

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
est.current_lang)# /cfoutput !--- End Usage --- -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 the component in the app scope

RE: Application Scope Problem

2009-06-18 Thread Adrian Lynch
[mailto:paulalkemadesi...@gmail.com] Sent: 18 June 2009 14:53 To: cf-talk Subject: RE: Application Scope Problem Code Example !--- Start set application in scope --- cfset application.translator=createObject(component,'packages.translator.tr ansla tor') !--- End set application in scope

RE: Application Scope Problem

2009-06-18 Thread Dawson, Michael
with component instantiation because this works 99% of the time, but 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

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

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

RE: Application Scope Problem

2009-06-17 Thread Jason Fisher
/cfif cfreturn temptext /cffunction From: b...@bradwood.com Sent: Wednesday, June 17, 2009 3:38 PM To: cf-talk cf-talk@houseoffusion.com Subject: RE: Application Scope Problem Do you think this could have anything to do with the fact

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). Application.cfm code

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... cfscript if (not isDefined(application.rews) { // set vars here } /cfscript ~|