So what your saying is
validation = structure
registration = structure within [validation]
step#currentstep# = structure within [validation.registration]

Are you sure step#currentstep# is always a structure?

What is the rest of your code like? It looks like somewhere your trying to do 
something simple, like string manipulation to a structure.

-----Original Message-----
From: Kay Smoljak [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 29 October 2003 10:21 AM
To: CFAussie Mailing List
Subject: [cfaussie] dynamic structure notation problem


Hey everyone,

Here's an interesting pickle... I'm trying to loop over a complex
structure containing structures of arrays of structures. Trick is, one of
the structure names is dynamic.

I can do this:
<cfloop list="#StructKeyList(validation.registration.step1)#" index="field">

But "step1" (which is a structure, containing a couple of simple values
and an array of structures) might actually be "step2". I tried this:

<cfparam name="currentstep" default="2">
<cfset structkey = "validation.registration.step#currentstep#">
<cfloop list="#StructKeyList(evaluate(structkey))#" index="field">

Which gives me the error "Complex object types cannot be converted to
simple values."

Any ideas? I'm spewing because I thought I had it all worked out
syntactically (it parses, then stops when a variable is not defined) but
when I feed real data through it barfs. My brain hurts :(

Thanks,
Kay.
_____________________________________________________________
Kay Smoljak            Web Developer         PerthWeb Pty Ltd

Level 9/105 St George's Terrace -  Perth  - Western Australia
Ph: (08) 9226 1366                        Fax: (08) 9226 1375

http://www.perthweb.com.au   http://developer.perthweb.com.au 

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to