Yes, I set it in the constructor. I have developed a CFC Generator and through the process of creating a CFC class file, I select a datasource to be associated with the CFC. When I generate the CFC file, I create a variable, this.datasource, and set it to the selected datasource. So, the datasource value is available throughout the class.
Tom -----Original Message----- From: Bryan F. Hogan [mailto:[EMAIL PROTECTED] Sent: Friday, January 16, 2004 8:23 AM To: [EMAIL PROTECTED] Subject: RE: [CFCDev] How do you like your initialization? Yes but where is your datasource name coming from? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Schreck, Thomas (PPC) Sent: Friday, January 16, 2004 9:22 AM To: [EMAIL PROTECTED] Subject: RE: [CFCDev] How do you like your initialization? I typically use an init() method to initialize my object. Usually I pass in a record ID and pull the data from a database to populate the properties of the component using each property's set method. I also set variables outside an init() method at the top of the component page. These variables get set just once when the class is instantiated. They are set before any method is called. I guess this is like a constructor method in Java. Thanks - Tom Schreck 817-252-4900 [EMAIL PROTECTED] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
