Bryan, you are still missing the basic idea. You are not passing an instance
of a CFC to yaddaDoodle. You are passing a string and a number. 6 is not a
CFC.  

You should have:

<cfinvoke component="specialNumber" method="specialNumber"
returnVariable="x">
        <cfinvokeargument name="theNumber" value=6>
</cfinvoke>
<cfset foo = createObject("component","test")>
<cfset goo = foo.yaddaDoodle(x)>
 
===========================================================================
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc (www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email    : [EMAIL PROTECTED]
Blog     : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda  

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Bryan F. Hogan
> Sent: Thursday, January 08, 2004 10:07 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [CFCDev] Custom argument types
> 
> Specialnumber.cfc
> <cfcomponent>
>       <cffunction name="specialNumber" access="public"
> returntype="any">
>               <cfargument name="theNumber" required="yes"
> type="numeric">
>               
>               <cfset var specialNumberReturn=false>
>               <cfscript>
>                       if(arguments.theNumber gt 5)    {
>                               specialNumberReturn=true;
>                       }
>               </cfscript>
>               
>               <cfreturn this>
>       </cffunction>
> </cfcomponent>
> 
> Test.cfc
> 
> <cfcomponent>
>       <cffunction name="yaddaDoodle" access="public"
> returntype="boolean">
>               <cfargument name="theSpecialNumber" required="yes"
> type="specialNumber">
>       
>               <cfreturn arguments.theSpecialNumber>
>       </cffunction>
> </cfcomponent>
> 
> yaddaDoodle(6) and yaddaDoodle('fred') both return error.


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words '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