Howdy,

I keep getting the complex objects cannot be converted to simple data type
errors.  Am I doing something crazy here?

Here is the component:

<cfcomponent displayname="delimitQuery" hint="I Take A query and turn it
into a delimited content variable to output into a file">
        
        <cffunction name="init" access="public" output="no"
returntype="delimitQuery">
                <cfargument name="query" required="yes" type="query"/>
                <cfargument name="delimeter" required="yes" type="string"
default=","/>
                <cfset variables.theQuery = arguments.query/>
                <cfset variables.delimeter = arguments.delimeter/>
                <cfreturn this/>
        </cffunction>

        <cffunction name="getQuery" access="public" returntype="any"
output="yes">
                <cfreturn variables.theQuery/>
        </cffunction>
        <cffunction name="getDelimiter" access="private" returntype="string"
output="no">
                <cfreturn variables.delimeter/>
        </cffunction>
        
        <cffunction name="delimit" access="public" returntype="string"
output="yes">
                <cfloop query="#getQuery()#">
                        <!---I am going to loop here to build the content
var--->
                </cfloop>
        </cffunction> 
        
</cfcomponent>


Here is the calling page:

<cfset testQuery = QueryNew("col1,col2,col3")/>

<cfset queryAddRow(testQuery,2)/>
<cfset querySetCell(testQuery,"col1","col1_1",1)/>
<cfset querySetCell(testQuery,"col2","col2_1",1)/>
<cfset querySetCell(testQuery,"col3","col3_1",1)/>

<cfset querySetCell(testQuery,"col1","col1_2",2)/>
<cfset querySetCell(testQuery,"col2","col2_2",2)/>
<cfset querySetCell(testQuery,"col3","col3_2",2)/>

<cfdump var="#testQuery#"/>

<cfset delimiter =
CreateObject('component','developmentcfc.libr.delimitQuery').init(testQuery,
"44")/>
<cfset delimiter.delimit()/>

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to