> 2) Do I need to lock a function call such as IsStruct or StructKeyExists
> with a readonly lock?
Edward,
As I understand it, yes. You're still accessing the scope, after all.
> The problem with using this approach on functions such as IsStruct is that
> YOU DON'T KNOW IF THAT VARIABLE OR KEY IS THERE.
In that case, do this (assuming you're using CF4.5):
<cflock scope="application">
<cfset request.application = Duplicate(application)>
</cflock>
<cfif IsStruct(request.application.userInfo)>
...CODE...
</cfif>
Just remember to copy request.application back to the original scope if you
make any changes.
<hr width="25%" align="left"><big><b>Roger<br>Dictator-in-Chief - <font
color="red">section12.com</font></b></big>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists