Yes, though I set up the variables in the init() method instead of the
pseudo-constructor area.
I also usually don't put variables. in front of instance once I've created
it.
I also always return THIS from the init() method to allow me to do:
foo = createobject("component","foo").init();
But, you've got the idea.
>
> So essentially, are u saying the below is the apt usage?
> <cfcomponent>
> <cfset variables.instance = structNew() />
> <cfset variables.instance.firstName = "" />
> <cfset variables.instance.lastName = "" />
> <cfFunction name="init" access="public" returntype="struct"
> output="false">
> <cfset variables.instance.firstName = "Bob" />
> <cfset variables.instance.lastName = "Smith" />
> <cfReturn variables.instance />
> </cfFunction>
> </cfcomponent>
>
> Joe
>
----------------------------------------------------------
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).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]