I don't think so... take for example the following if locking could be done in <CFSCRIPT/>
<CFIF serviceAvailable('borkyService')> do stuff, we don't care about how serviceAvailable() does it's job, just that we ask for a service and it tells us if it is available internally, serviceAvailable must perform a named lock around say some code accessing a global structure that holds the services that are currently configured in the website, say, APPLICATION.Services but this calling section of code doesn't care aboutt that we don't want to know how the job is done, only that it is </CFIF> whereas without the locking I have to do <CFLOCK ....> <CFIF serviceAvailable('borkyService')> now we have to split the implementation of serviceAvailable, no longer do we not care how it is done, we have to be a part of it. If we have to change the lock name for example, we can't just change it in serviceAvailable() we have to change it here, and anywhere else we use serviceAvailable() not to mention, all the code in this if statement is now holding, unnecessarily, a lock, so that no other block using serviceAvailable() is able to run </CFIF> </CFLOCK> in conclusion I think that not having locks in CFSCRIPT is causing the break of scope. At 02:37 AM 11/2/2001, you wrote: >Pete, >you are right concerning <cfscript> but I can't see the limitations >regarding UDFs. > >A UDF pre se is meant to be self-contained and therefore not relying on >anything outside it's >own scope. Wouldn't the use of shared data inside a UDF be defeating this >purpose? > >You could read a shared scope variable into a local variable and get >that into the UDF do what ever you do and than return a new value, >write that value into your shared data. > >Birgit ---------- James Sleeman Innovative Media Ltd Phone: (03) 377 6262 http://www.websolutions.co.nz/ CAUTION: The information contained in this email message is confidential and may be legally privileged. If the reader of this message is not the intended recipient you are notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error please notify the sender immediately and destroy the original message and any attachments. Views expressed in this communication may not be those of Innovative Media Ltd. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists