> Should you not be using structInsert(structure, key,
> value,
> [allowOverwrite]) ?
> Instead of <cfset mystruct[x] = otherstruct[x]>

> i.e. structInsert(mystruct, x, evaluate("otherstruct." &
> x))

I can, however, I still have to use evaluate("otherstruct." & x) instead of
for instance:

structinsert(mystruct,x,otherstruct[x],true)

I shouldn't have to use evaluate tho, and even if the syntax weren't valid,
it should throw a syntax error, not an unknown exception condition. The bug
makes it impossible to use the valid array notation syntax as in this
example here, and because it throws an unkown exception the CF Server is
unable to provide any information about the location of the error (which
wouldn't help anyway since the error occurs well after the problem).

It never fails tho -- moments after sending the email to cf-talk I found the
place where I had array notated values added to my structure and was able to
apply the work-around... I really wish it didn't need a workaround, but such
is life I suppose.


s. isaac dealey                954-776-0046

new epoch                      http://www.turnkey.to

lead architect, tapestry cms   http://products.turnkey.to

tapestry api is opensource     http://www.turnkey.to/tapi

certified advanced coldfusion 5 developer
http://www.macromedia.com/v1/handlers/index.cfm?ID=21816

> ----- Original Message -----
> From: "S. Isaac Dealey" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Monday, February 10, 2003 1:52 PM
> Subject: array notation == unknown exception condition


>> there is a rare condition in which CF 5 just hozes up a
>> complex variable
> (I
>> think it only occurs with structures, but I'm not
>> certain). I know in
>> particular that this has happened with my code on several
>> occasions
> wherein
>> if I use valid array notation for the structure, an
>> unknown exception
>> condition occurs, but if I use evaluate() to set the same
>> variables, it
>> works fine. At some point I remember reading on one of my
>> mailing lists
>> someone else mentioning having a problem with this same
>> sort of thing
> which
>> apparently was a known bug, but not very common (and as a
>> result not well
>> documented).
>>
>> My first test case of this bug was this:
>>
>> pseudocode:
>>
>> <base template>
>> <cf_manager>
>> <cf_getvariables>
>> <cfset mystruct = structnew()>
>> <cfloop item="x" collection="#otherstruct#">
>> <cfset mystruct[x] = otherstruct[x]></cfloop>
>> <cfset caller.mystruct = mystruct>
>> </cf_getvariables>
>> <cfset caller.mystruct = mystruct>
>> <cf_manager>
>> <cfoutput>
>> #structkeyexists(mystruct,x)# == true
>> #issimplevalue(mystruct[x])# == false
>> #issimplevalue(evaluate("mystruct." & x))# == true
>> #mystruct.x# == [[ERROR UNKNOWN EXCEPTION CONDITION]]
>> </cfoutput>
>> </base template>
>>
>> The custom tags weren't using end-tag syntax -- the xml
>> format is
> convenient
>> for the explanation of the problem.
>>
>> Currently I'm having a similar problem wherein the
>> duplicate() function
>> causes the unknown exception condition because the data
>> is in a similar
>> state.
>>
>> <cfoutput>
>> #structkeyexists(mystruct,x)# == true
>> #issimplevalue(mystruct[x])# == false
>> #issimplevalue(evaluate("mystruct." & x))# == true
>> <cfset temp = duplicate(mystruct)> == [[ERROR UNKNOWN
>> EXCEPTION
> CONDITION]]
>> </cfoutput>
>>
>> I'm hoping that possibly someone on the list has a deeper
>> understanding of
>> the issue and what causes it. I know that in the past
>> I've been able to
> make
>> this change from:
>>
>> <cfset mystruct[x] = otherstruct[x]>
>>
>> to
>>
>> <cfset mystruct[x] = evaluate("otherstruct.#x#")>
>>
>> and this has been an effective work-around. At the moment
>> I'm at a loss to
>> find a similar construct in the code, so I'm not sure how
>> to isolate or
>> debug the offending code. I know the duplicate() function
>> isn't actually
> the
>> cause -- the cause is burried somewhere else in the code
>> where the
> structure
>> I'm trying to duplicate is being created, but I can't
>> seem to figure out
>> where.
>>
>> Any insight is greatly appreciated,
>>
>> Thanks,
>>
>> s. isaac dealey                954-776-0046
>>
>> new epoch                      http://www.turnkey.to
>>
>> lead architect, tapestry cms   http://products.turnkey.to
>>
>> tapestry api is opensource     http://www.turnkey.to/tapi
>>
>> certified advanced coldfusion 5 developer
>> http://www.macromedia.com/v1/handlers/index.cfm?ID=21816
>>
>>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~~~~|
> Archives:
> http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
> Subscription: http://www.houseoffusion.com/cf_lists/index.
> cfm?method=subscribe&forumid=4
> FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
> Structure your ColdFusion code with Fusebox. Get the
> official book at http://www.fusionauthority.com/bkinfo.cfm

>                               Unsubscribe: http://www.houseoffusion.com/cf_lists/uns
>                               ubscribe.cfm?user=633.558.4


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to