how come? If your init returns "this", just do:

obj.usr =
CreateObject("Component","path.to.users").init("my","passed","aruments");

That's pretty much the de-facto standard for CFC instantiation, at
least (until we ALL get a cfconstructor tag :)

-dave


>>> [EMAIL PROTECTED] 5/24/2004 8:06:18 AM >>>
I know but I have come to terms with having 2 lines of code to 
construct my objects

obj.usr = CreateObject("Component","path.to.users");
obj.usr.init("my","passed","aruments");


On May 24, 2004, at 1:14 AM, Jim Davis wrote:

> That should work, but it doesn't address passing parameters on
> instantiation.
>
> Jim Davis
>
>> -----Original Message-----
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On

>> Behalf
>> Of Ian Sheridan
>> Sent: Sunday, May 23, 2004 11:04 PM
>> To: [EMAIL PROTECTED] 
>> Subject: Re: [CFCDev] constructors and initialisation
>>
>> from what I understand you can do this:
>>
>> <cfcomponent>
>>      <cfscript>
>>              init();
>>      </cfscript>
>>      <cffunction name="init">
>>              your code here
>>      </cffunction>
>> </cfcomponent>
>>
>> am I wrong about this?

----------------------------------------------------------
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]

Reply via email to