Well your cfc is called mailServ, but you're saying the type is mailserver.
Everything is based on the file name, not what you put in cfcomponent name. 


Russ

> -----Original Message-----
> From: Brent Shaub [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 10, 2006 11:47 AM
> To: CF-Talk
> Subject: Path of a cfc important?
> 
> Hello all,
> 
> I have a bunch of .cfcs in the same folder whose init() function creates
> application-level instances of the cfc object.  I make reference to one of
> these objects as a parameter when initializing another cfc.  It works fine
> when everything is in the same folder.  When I pass in an application-
> level object to a cfc in a different folder, I get an error that the
> parameter object's type is not the expected type.  I'm wondering if anyone
> has seen this before and knows how to correct.
> 
> Here's some code to help:
> 
> /cfcs/email/email.cfc
>       <cffunction name="init" returntype="email" output="false">
>               <cfargument name="mailserv" type="mailserver"
required="true"
> />
> 
>               <cfset variables.mailserv = arguments.mailserv />
> 
>               <cfreturn this />
>       </cffunction>
> 
> 
> /cfcs/mailserv/mailserv.cfc
>       <cffunction name="init" returntype="mailserver" output="false">
>               ...
> 
>               <cfreturn this />
>       </cffunction>
> 
> in application.cfm:
>       <cfset application.mailserv = createObject("component",
> "cfcs.mailserv.mailserv").init() />
>       <cfset application.email = createObject("component",
> "cfcs.email.email").init(mailserv = application.mailserv) />
> 
> 
> Thanks in advance.  Been trying everything to no avail!
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:249488
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to