If you want to do that, you have to put <CFRETURN this /> at the end of your
init() method so that you get a reference.

Cheers,
barneyb 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Todd Rafferty
> Sent: Friday, January 23, 2004 5:22 PM
> To: [EMAIL PROTECTED]
> Subject: [CFCDev] "Method chaining"
> 
> 
> Curious question... I know that several people have started coding 
> things like this:
> 
> <cfset compObj= 
> createObject("component","com.whatever.component").init()>
> 
> Everytime I do this, I get compObj is not defined when I try 
> to <cfdump> 
> it.  When I take off the .init() at the end of the createObject() 
> statement, then compObj is defined.  I must have missed 
> something here 
> and I've looked around and I don't see that I'm doing 
> anything different 
> than anyone else is.
> 
> reference article:
> http://www.oreillynet.com/pub/a/javascript/2003/09/24/coldfusi
> on_tips.html
> 
> Thanks,
> ~Todd
> ----------------------------------------------------------
> 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