Yup, works in CFMX.  Patti, are you sure that's the data you have in your structure?

----- Original Message -----
From: "Robertson-Ravo, Neil (RX)" <[EMAIL PROTECTED]>
Date: Tuesday, January 14, 2003 8:54 am
Subject: RE: WDDX bug?: structure keys into arrays unintentionally

> I am not sure about CFMX, but the following works in CF5 :
> 
> <cfscript>
>       foo = structnew();      
>       temp = StructInsert(foo,"Doprotocol", 1,"yes");
>       temp = StructInsert(foo,"eventdate", "2002-01-09","yes");
>       temp = StructInsert(foo,"gender",  "male","yes");       
> </cfscript>
> <cfwddx action="CFML2WDDX" input="#foo#" output="myfoo">
> <cfdump var="#foo#"> 
> 
> 
> ?
> 
> -----Original Message-----
> From: Patti G. L. Hall [mailto:[EMAIL PROTECTED]]
> Sent: 14 January 2003 15:48
> To: CF-Talk
> Subject: WDDX bug?: structure keys into arrays unintentionally
> 
> 
> Has anybody else seen this?
> 
> I've got a large structure with a bunch of single key values like:
> 
> Doprotocol | 1
> Eventdate | 2002-01-09
> Gender | male
> 
> 
> When I wddx it and look at the results, a lot of these keys are 
> turned into
> arrays.  Not only that, but some of the arrays have 4 indices (all 
> with the
> same values:
> 
> Doprotocol | 1
> Eventdate |
>    -- array --
>    1: 2002-01-09
>    2: 2002-01-09
>    3: 2002-01-09
>    4: 2002-01-09
> Gender |
>    -- array --
>    1: male
> 
> Why?  Is this a bug that I need to log?  I'm running CFMX with 
> both updates
> and a security patch.
> 
> 
> Here is the wddx code.  It's in a component.
> 
> [cffunction name="saveWddxReport" output="false" returntype="void"
> access="public"]
> 
>    [cfargument name="saeid" required="true" type="numeric"]
>    [cfargument name="report" required="true" type="struct"]
>    [cfargument name="saveType" required="true" type="string"
> default="initial"]
> 
>    [cfset var wddxReport=""]
> 
>    [cfwddx input="#arguments.report#" action="cfml2wddx"
> output="wddxReport"]
> 
>       [cfif arguments.saveType eq 'initial']
>          [cfquery name="saveReport" datasource="#request.dsn#"]
>             Insert into saeReport_initial (saeid, report)
>             Values (#arguments.saeid#, '#wddxReport#')
>          [/cfquery]
> 
>       [cfelseif arguments.saveType eq 'final']
>          [cfquery name="saveReport" datasource="#request.dsn#"]
>             Insert into saeReport_final (saeid, report)
>             Values (#arguments.saeid#, '#wddxReport#')
>          [/cfquery]
>       [/cfif]
> [cfreturn]
> [/cffunction]
> 
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Get the mailserver that powers this list at http://www.coolfusion.com

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

Reply via email to