Ok...

I have an issue with a dynamically created structure.  In CFMX, the code
works absolutely perfectly well, but put it into CF5 and it all screws up!

---------code-----------
        <!--- loop over the "data" structure (which comes from the query)
--->
        <cfloop list="#listsort(structkeylist(data), "text")#" index="user">
                <cfset keys = structkeylist(data[user])>
                <!--- loop over the data[user] struct --->
                <cfloop list="#keys#" index="tbl">
                        <!--- I know this can be done in one line... --->
                        <cfset temporaryStruct = duplicate(data[user][tbl])>
                        <cfset fieldlist = structkeylist(temporarystruct)>
                </cfloop>
        </cfloop>
---------/code-----------

When I do a <cfdump var="#data[user][tbl]#"> (in CF5) I get a structure
dumped with an array inside it.

However, when I do this:

<cfset keylist = structkeylist(data[user][tbl])>

It throws an "expression" error, saying it cannot convert the given value to
a struct.

Any ideas?

Paul
-----------------------------------
Paul Johnston
PJ Net Solutions Ltd
http://www.pjnetsolutions.com
[EMAIL PROTECTED]
+44 (0)7866 573013



--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to