You shouldn't need to.  If you need a utility function, it should be a
method of the CFC you're in.  CFCs should stand on their own as much as
possible, so they don't need any external resources (other than method
arguments) to function.  That's not always possible, but it usually is.

If you really have a function you need to use, and it doesn't make sense to
put the function in the CFC directly, put it in another CFC that you don't
instantiate, you just call methods on statically.  In other words, CFINVOKE
with the name of the CFC, not CFOBJECT or createObject() and then a method
call on the object.  You can then call that method from your CFC as if it
where a UDF, and you don't have to include it anywhere first.

barneyb
  -----Original Message-----
  From: Bryan Stevenson [mailto:[EMAIL PROTECTED]
  Sent: Thursday, October 23, 2003 1:57 PM
  To: CF-Talk
  Subject: CFCs and UDFs

  Hey All,

  Can  a UDF be used inside a CFC is the UDF is included in the template
that
  calls the CFC? or the UDF is included via Application.cfm?

  From what I've seen it cannot...but mabye my info is off ;-)

  TIA

  Cheers

  Bryan Stevenson B.Comm.
  VP & Director of E-Commerce Development
  Electric Edge Systems Group Inc.
  t. 250.920.8830
  e. [EMAIL PROTECTED]

  ---------------------------------------------------------
  Macromedia Associate Partner
  www.macromedia.com
  ---------------------------------------------------------
  Vancouver Island ColdFusion Users Group
  Founder & Director
  www.cfug-vancouverisland.com


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to