Stick with <cfscript> and it will make your life a little eaier:

myObj = createObject("component", "com.mydomain.mycomponent").init(myArgs);

have your init() return then component itself using 'return this'.

-Adam

> -----Original Message-----
> From: Craig Earls [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 24, 2004 12:34 AM
> To: 'CF-Talk'
> Subject: Can you parameterize instantiation of a CFC?
>
> I must be missing something in the docs on CFCs.  If I want to instantiate a
> persistent CFC I have to use <cfobject>, but there doesn't appear to be a
> way to pass parameters to a "constructor". Is this even possible or should I
> just get use to creating the object then <cfinvoke>ing an initialization
> function with an argument. In this case the object I want to instantiate
> needs to gather information from a datasource before it can be of any use.
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to