Re: reinit application variables
How do you reset application variables? I am using application.cfc to set some application variables and cant figure out how to reset them so they reload with different data. Thanks, Chad OnApplicationStart() doesn't seem to always work for me. I don't think it clears the scopecache or some other settings. I want something that will basically restart the server! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299917 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: reinit application variables
OnApplicationStart() doesn't seem to always work for me. I don't think it clears the scopecache or some other settings. I want something that will basically restart the server! The onApplicationStart function doesn't clear the scope cache or anything else by default. It does whatever you tell it to. If you want to destroy existing Application variables and reinitialize them, you are responsible for doing that yourself within the function body. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Training: Adobe/Google/Paperthin Certified Partners http://training.figleaf.com/ WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers! http://www.webmaniacsconference.com/ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299927 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: reinit application variables
Matt, Is there any performance gain using structKeyExists(url, 'init') over isdefined(url.init) ? Is it a best pactice thing or your own preference? Ric. On Feb 17, 2008 7:48 AM, Matt Williams [EMAIL PROTECTED] wrote: On Feb 16, 2008 3:40 PM, Chad Gray [EMAIL PROTECTED] wrote: How do you reset application variables? I am using application.cfc to set some application variables and cant figure out how to reset them so they reload with different data. One way is to add this in onRequestStart: cfif structKeyExists(url, 'init') AND url.init EQ myInitPass cfset onApplicationStart() / /cfif Then you can reset them by adding init=myInitPass into the url. -- Matt Williams It's the question that drives us. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299238 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: reinit application variables
On Feb 17, 2008 5:38 PM, Ricardo Russon [EMAIL PROTECTED] wrote: Matt, Is there any performance gain using structKeyExists(url, 'init') over isdefined(url.init) ? Is it a best pactice thing or your own preference? Ric. structKeyExists is my preference. As whether or not there is a performance gain, I'm sure others will be glad to debate. And it won't be the first time. http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:33841#170108 http://www.google.com/search?q=structkeyexists+vs+isdefined -- Matt Williams It's the question that drives us. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299241 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: reinit application variables
StructKeyExists is faster since it targets a specific variable scope instead of incrementally searching though all scopes. You should use structKeyExists unless you are searching for a variable that can be in multiple scopes. -Mike Chabot On Feb 17, 2008 6:38 PM, Ricardo Russon [EMAIL PROTECTED] wrote: Matt, Is there any performance gain using structKeyExists(url, 'init') over isdefined(url.init) ? Is it a best pactice thing or your own preference? Ric. On Feb 17, 2008 7:48 AM, Matt Williams [EMAIL PROTECTED] wrote: On Feb 16, 2008 3:40 PM, Chad Gray [EMAIL PROTECTED] wrote: How do you reset application variables? I am using application.cfc to set some application variables and cant figure out how to reset them so they reload with different data. One way is to add this in onRequestStart: cfif structKeyExists(url, 'init') AND url.init EQ myInitPass cfset onApplicationStart() / /cfif Then you can reset them by adding init=myInitPass into the url. -- Matt Williams It's the question that drives us. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299242 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
reinit application variables
How do you reset application variables? I am using application.cfc to set some application variables and cant figure out how to reset them so they reload with different data. Thanks, Chad ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299210 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: reinit application variables
On Feb 16, 2008 3:40 PM, Chad Gray [EMAIL PROTECTED] wrote: How do you reset application variables? I am using application.cfc to set some application variables and cant figure out how to reset them so they reload with different data. One way is to add this in onRequestStart: cfif structKeyExists(url, 'init') AND url.init EQ myInitPass cfset onApplicationStart() / /cfif Then you can reset them by adding init=myInitPass into the url. -- Matt Williams It's the question that drives us. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299211 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4