Assuming that the template with this code is in the same directory as the
cfc... try...

<cfobject name="application.udfs" component="myCFC" />
<cfdump var="#application.udfs#" />

Then to call the specific function you would do...

application.udfs.myFunction1()

..:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
http://cf4em.com


-----Original Message-----
From: Richard White [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 22, 2008 12:09 PM
To: CF-Talk
Subject: referecing a cfc function

Hi,

a basic question im sure, i am now just getting round to trying to use cfc's
as much as possible but have the following question.

i have included a cfc in the application onStart tag, and want to put a
function from the cfc into the application variable. therefore, also in the
onStart tag i am trying to reference the cfc as follows:

<cfinclude template="myCFC.cfc">

<cfset application.udfs = structnew()>
<cfset application.udfs = myCFC.myFunction1>

but it is saying  myFunction1 is not defined in myCFC

can someone tell me how what i am doing wrong

thanks 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

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

Reply via email to