When you first invoke a CFC any code that does not reside within a method 
(I.E. the cffunction tag) is executed immediately.  This code acts as 
constructor code.  Although, if my understanding (and memory) is correct, 
when programming in Java, there are specific methods for constructors.

  Do you mean to say that CFCs don't have a method that is automatically 
called when an instace of the component is created, and therefore by 
definition does not have a constructor?  Or am I completely confused?



At 04:23 PM 7/10/2002 -0700, you wrote:
>CFCs don't have contructors. I know it is convientant to use the term
>constructor, but it is an improper use and can lead to improper
>understanding by the readers of this list.
>
>Matt Liotta
>President & CEO
>Montara Software, Inc.
>http://www.montarasoftware.com/
>V: 415-577-8070
>F: 415-341-8906
>P: [EMAIL PROTECTED]
>
>
> > -----Original Message-----
> > From: Raymond Camden [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, July 10, 2002 4:12 PM
> > To: CF-Talk
> > Subject: RE: Component Calls: What would you do?
> >
> > >
> > >   The more I think about this, the more that I think my second
> > > suggestion  (I.E. an auditTrail property of the department)
> > > may be the best
> > > solution.  Unfortunately, the documentation is scarce when it
> > > comes to
> > > properties and I have not done testing with component
> > > properties and how
> > > they relate to methods of those components.
> > >   Do you have any additional thoughts on this one Ray?
> >
> >
> > Well, it depends on how complex you want to get - but in general,
>there
> > is nothing wrong with doing
> >
> > <cfset this.myLogger = createObject("component","auditTrail")>
> >
> > in your constructor and then doing:
> >
> > <cfset this.myLogger.log(...)>
> >
> > in your methods.
> >
> >
> > -ray (trying to type w/ a squirmy baby on my lap)
> >
> >
> >
>
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to