Yeah I know how to call a CFC.  With CFARGUMENT though if I am passing a
custom type into it how does the CFC know what to do?

<cfargument name="myList" required="No" type="MyNurmericList" />

---CFC--
<cfcompoent>
        // what goes in here?
</cfcomponent>

Or do you call it like....

<cfargument name="myList" required="No"
type="#MyNurmericList.isValid(arguments.myList)#" />

This is the bit I don't get because usually you would call a method in the
CFC but the docs say they custom type is a reference to a CFC

Steve



-----Original Message-----
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Chris Velevitch
Sent: Tuesday, 17 April 2007 5:42 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Custom CFC Argument Types


On 4/17/07, Steve Onnis <[EMAIL PROTECTED]> wrote:
> I got that far but was unsure as to how to structure the CFC so that 
> it validated.  Do you set up properties or something?  Or does it call 
> the INIT method automatically?

Basically you are passing a reference to an instance of an object of a
specific type:-

    <cfset myNumericList =
CreateObject("component","com.onnis.MyNurmericList")>
    <cfset myNumericList.somemethod(somevalue)>
    <cfif myNumericList.isValid()>
         <cfset myCFC.method(myNumericList)>
     </cfif>

Unfortunately there are many ways it initialise the cfc. It's up to you to
choose one. Certainly an init method is one, but as far as I'm aware,
there's no automatic calling of a constructor method. But you still need to
pass it the values of your list.



Chris
--
Chris Velevitch
Manager - Sydney Flash Platform Developers Group
m: 0415 469 095
www.flashdev.org.au




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to