I agree it is hackish.
By definition, a constructor is a method. The "constructor code" is not contained in a method, but it does serve the same purpose.


At 11:29 AM 7/24/2003 -0700, you wrote:
official or not, it's still rather hackish, IMHO.  Much better to add an
init() method and explicitly call that when you create the object, because
then you can also pass parameters to it (impossible with the native
'constructor').

barneyb

---
Barney Boisvert, Senior Development Engineer
AudienceCentral
[EMAIL PROTECTED]
voice : 360.756.8080 x12
fax   : 360.647.5351

www.audiencecentral.com


> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of Raymond Camden > Sent: Thursday, July 24, 2003 11:20 AM > To: [EMAIL PROTECTED] > Subject: [CFCDev] Unofficial? Constructor > > > Nathan pointed out something to me. We've been saying that the > constructor concept is an unofficial hack. This is not the case. The > documentation actually mentions it. This is a cut and paste... > unfortunately it's RedSky, not MX, but I'm sure the same text exists in > MX: > > ---- > You initialize instance data at the top of the component definition, > before the method definitions. ColdFusion executes this code when it > instantiates the component; for example, when a cfobject tag creates the > component instance. Because this code executes only when the instance is > created and it typically "constructs" properties of the component, > instance data initialization code is sometimes called constructor code. > ---- > > So, to everyone who said it wasn't official, "So there! Nanananananan!" > > Ok, I'll revert to my original age now. > > ======================================================================== > === > Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc > (www.mindseye.com) > Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) > > Email : [EMAIL PROTECTED] > Blog : www.camdenfamily.com/morpheus/blog > Yahoo IM : morpheus > > "My ally is the Force, and a powerful ally it is." - Yoda > > ---------------------------------------------------------- > 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). > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.502 / Virus Database: 300 - Release Date: 7/18/2003

----------------------------------------------------------
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).

--
Jeffry Houser | <mailto:[EMAIL PROTECTED]>
AIM: Reboog711 | Phone: 1-203-379-0773
--
My Books: <http://www.instantcoldfusion.com>
--
We Provide The Soundtrack to your Web: <http://www.fcfstudios.com>
--
Original Energetic Acoustic Rock: <http://www.farcryfly.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