Thanks barney, does anybody have any use in a component like this, if so I
will send out final code.

Justin

-----Original Message-----
From: Barney Boisvert [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 4:42 PM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] Ref. a query via getter?


Every thing looks good (at least from my quick skim), except that yo're
missing a CFRETURN in the delimit method.  You need to return a string, even
if it's just "", or change the returntype to void.



> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Justin Balog
> Sent: Wednesday, October 29, 2003 3:15 PM
> To: '[EMAIL PROTECTED]'
> Subject: [CFCDev] Ref. a query via getter?
>
>
>
> 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]

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