Ahhh, looks like that will be it then. Strange as I had used bool before on
another function and it seemed to work - it must have been throwing an error
as well but I never noticed!!

Thanks for the help.


Giles Roadnight
http://giles.roadnight.name


-----Original Message-----
From: Tim Blair [mailto:[EMAIL PROTECTED] 
Sent: 21 March 2003 12:28
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] CFC return variable tpye problem

Hmmm...

Let me say that a bit more clearly (paraphrasing the CFMX reference):

The returnType attribute of the cffunction tag is optional except for
when a CFC is being used as a web service.  The value of this attribute
can be any of the following: any, array, binary, boolean, date, guid,
numeric, query, string, struct, uuid, void.  If the value is not a
recognised type, CF processes it as a component name.

For example, here I have a CFC called com.rawnet.error which holds error
reporting info.  In another CFC I have a function like this:

<cffunction name="blah" returntype="com.rawnet.error" ... >
    <cfset err = createobject("component", "com.rawnet.error")>
    ...
    <cfreturn err>
</cffunction>

So here, I am returning an instance of the com.rawnet.error class, which
is specified as the returntype attribute for the <cffunction> tag.

Clear?  As mud...

Tim.


-------------------------------------------------------
RAWNET LTD - Internet, New Media and ebusiness Gurus.
Visit our new website at http://www.rawnet.com for
more information about our company, or call us anytime
on 01344 393 040.
-------------------------------------------------------
Tim Blair
Web Application Engineer, Rawnet Limited
Direct Phone : +44 (0) 1344 393 441
Switchboard : +44 (0) 1344 393 040
-------------------------------------------------------
This message may contain information which is legally
privileged and/or confidential.  If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
-------------------------------------------------------


> -----Original Message-----
> From: Tim Blair [mailto:[EMAIL PROTECTED] 
> Sent: 21 March 2003 12:23
> To: [EMAIL PROTECTED]
> Subject: RE: [ cf-dev ] CFC return variable tpye problem
> 
> 
> 
> Giles,
> 
> > "The value returned from function saveAddressBook() is not of
> > type Bool."
> 
> The type should be "boolean" not bool -- the return type is 
> being checked to see if it's an instance of a CFC called 
> "bool" and obviously this is not the case and so is failing...
> 
> Tim.
> 
> -------------------------------------------------------
> RAWNET LTD - Internet, New Media and ebusiness Gurus.
> Visit our new website at http://www.rawnet.com for
> more information about our company, or call us anytime
> on 01344 393 040.
> -------------------------------------------------------
> Tim Blair
> Web Application Engineer, Rawnet Limited
> Direct Phone : +44 (0) 1344 393 441
> Switchboard : +44 (0) 1344 393 040
> -------------------------------------------------------
> This message may contain information which is legally 
> privileged and/or confidential.  If you are not the intended 
> recipient, you are hereby notified that any unauthorised 
> disclosure, copying, distribution or use of this information 
> is strictly prohibited. Such notification notwithstanding, 
> any comments, opinions, information or conclusions expressed 
> in this message are those of the originator, not of rawnet 
> limited, unless otherwise explicitly and independently 
> indicated by an authorised representative of rawnet limited.
> -------------------------------------------------------
> 
> 
> 
> -- 
> ** 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]
> 
> 
> 



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



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