I dont think he is saying you need to write the simple assignment
statement as another object.
your component shoudl look like so though the "counter" stuff in my
init method is invalid as you would only use one of the two options
described.
<cfcomponent name="mycomponent">
<cffunction name="init" hint="I am the 'constructor' of this object"
returntype="mycomponnet">
<!--- if counter is used by various methods, then add it to the
variables scope --->
<cfset variables.my.counter = 0>
<!--- if it isn't used across, and is simply a variable used within
this method declare it as a local variable -->
<cfset var counter = 0>
.. do some stuff...
<cfreturn this>
</cffunction>
<cffunction name="
</cfcomponent>
then in your calling file you would do:
<cfset myC = createObject("component","mycomponent").init() >
Hope I'm not muddying the waters on you Phillip
Bill
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).
CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm
An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]