I have addressed this particular annoyance by putting an isdefined() check on 
my value before attempting to use it, but does anyone know what could cause 
this?

In the beginning of a CFM page, I have:
<cfset ST_userid=''>

This is not in any block other than the main body of the script... that is, it 
is outside any loops, cfif, etc.

Later, under certain situations, ST_userid is reassigned using one of these 
possible assignments:

        <cfset ST_userid = User.user_id>  (User is a SQL query result with one 
record, user_id is numeric value, and the identity of the table, thus never 
null)

        <cfset ST_userid = Cookie.COOKIENAMEOMMITED>  (after checking if cookie 
exists in Cookie structure)


Then, later in the code, I use a comparison:

<cfif
  (
    structkeyexists(Application.SessionTracker[ID], "USERID")
    AND Application.SessionTracker[ID].USERID is not ST_userid
  ) 
OR NOT structkeyexists(Application.SessionTracker[ID],"USERID")

>

And, on RARE occaision, this ends up throwing an error that ST_userid is 
undefined!!

How could it possibly be undefined?  If the assignments to ST_userid somehow 
managed to not be defined, then the error should be thrown at that point 
complaining that the structure Element is undefined... but it passes through 
all that logic and thus should either be one of the two values, or nothing.. 
but not undefined?


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268349
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to