Yes I'm sure.  Before I postsed to the list I ran an independent test, where
I grabbed the structure, printed it out with dump, wddxed it, printed it out
with dump and there it is.  Arrays where there are supposed to be keys.

In fact, just because I'm someone who is always willing to think it could be
my fault, let me try it again...

[time passes]

Yep.  Same result.  Here is the code I used.

[cfinvoke component="#request.components_path#.cmpCaerReport"
method="getReport" returnvariable="realReport"]
            [cfinvokeargument name="saeid" value="10000071"]
            [cfinvokeargument name="resolveJoins" value="1"]
[/cfinvoke] 

[cfdump var="#realReport#" label="real report" expand="no"]

[cfwddx input="#realReport#" output="wddxReport" action="cfml2wddx"]

[cfdump var="#wddxReport#" label="wddx report" expand="no"]


When Ilook at "real report" I see a nice structure that is mostly made up of
single keys.  There are a couple of arrys in the structure to begin with,
but I know about thos.

When I look at "wddx report" I see a structure with a lot of extra arrays
where all those single keys used to be.  Might be nice if I intended them to
be there, but I don't.

Anybody else got any ideas?

-patti

[EMAIL PROTECTED] wrote:

> 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
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