Wow, lol, too many replies to respond to individually, but thank you all 
for the feedback.  I have a much more elegant solution than my original CFC 
goal, but I still wanted to challenge myself to see if I could make this 
other way work as well.
 
Just for the record, my exact original intent was for my CFC to take 
multiple queries, completely unrelated except they all contain a specific 
date field, and return a two-dimensional array that orders the records from 
all the queries in chronological order relative to one another.  The first 
dimension would indicate which query to look at, and the second dimension 
would identify the index.  Then for each record, the user could use the 
first dimension to decide what additional data is available.
 
The original hope was for my CFC to be useable by the most basic of CF 
programmers (IE someone not familiar with Structs, etc).  In other words, I 
would have liked to set it up so the user could say...
 
<cfset myCFC.addQuery(qry1)>
<cfset myCFC.addQuery(qry2)>
<cfset myCFC.addQuery(qry3)>
<cfset newOrder = myCFC.doYourThing()>
 
<cfloop index="i" from="1" to="ArrayLen(newOrder)">
    <cfif newOrder[i][1] EQ "qry1">
        (display specific qry1 info at index newOrder[i][2])
    <cfelseif newOrder[i][2] EQ "qry2">
        (display specific qry2 info at index newOrder[i][2])
    etc etc...
</cfloop>
 
I think the easiest work-around there would be to have the user specify the 
name as a second parameter at the same time as they add the query to the 
CFC.  But I just wanted to make sure I wasn't missing something that would 
allow me to prevent that extra step for the user.  Afterall, who wants to 
explain the difference between...
 
<cfset myCFC.addQuery(qry1, "qry1")>
and
<cfset myCFC.addQuery("qry1", qry1)>
 
 

-- 
online documentation: http://openbd.org/manual/
 http://groups.google.com/group/openbd?hl=en

Reply via email to