If your goal is to be able to use the function on any page in the application you could put it in a file that is then included in the application.cfm. This will make the function available for local use on any page called in the whole application.
On 9/13/05, Jim Davis <[EMAIL PROTECTED]> wrote: > > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, September 13, 2005 11:40 AM > > To: CF-Talk > > Subject: Storing UDF in application scope > > > > Hi, > > > > I want to store a UDF in the application scope. Anyone know a trick to > > this and/or any issues regarding it? Here's what I tried that didn't > > work: > > > > <cfscript> > > function MyFunc() { ...function definition... } > > </cfscript> > > <CFLOCK SCOPE="application" TYPE="exclusive" TIMEOUT="10"> > > <CFSET application.MyFunc = MyFunc > > > </CFLOCK> > > It seems like it should work... I'm not sure if it was required (I forget) > but in my code I specify the scope: > > <cfset Request.IndexSelect = Variables.IndexSelect> > > Also, and I doubt this is a problem... but who knows?, I don't use > <CFSCRIPT> but rather <CFFUNCTION>. > > But in general what you have should work. > > Jim Davis > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218065 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

