I think you mean putting code within the CFCOMPONENT tags, but outside
of any CFFUNCTION tags.

The code will be executed when each component is instantiated or
invoked, but I'm not sure if it will actually run on the execution of
each method within that component.

You are probably better off having another method in your component (or
somewhere) that is specifically called in each method rather than
relying on the "constructor".  Who knows, that behaviour could change in
a future version of CF.

M!ke Dawson

-----Original Message-----
From: Thomas Chiverton [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 24, 2003 1:54 AM
To: [EMAIL PROTECTED]
Subject: [CFCDev] CFC constructors


I remember right that you can perform some trick in a CFC to have a 
constructor function run whenever any function within the CFC is
accessed ? 
Unfortunetly, I've forgotten how you do it, can anyone point the way ?

I'm planning to use this to store the result of some large calculations
in the 
appliction scope for speed.

-- 
Tom C
"Land of the free, home of the brave... you have to be brave to live
there and 
enjoy the freedoms"

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

Reply via email to