It depends on how you want to access the variables. If they are public, use
the THIS scope. If they are private, use the VARIABLES scope and use Get/Set
methods. 

Example:

<cfcomponent
        Displayname="tabcontroller"
        Output="no"
        Hint="Handles tab controller functionaliy">

<cffunction name="Init" access="public" returntype="tabcontroller"
output="no" hint="Returns and initialized tab controller instance.">
        
<cfset VARIABELS.MyTabControl.TabType = TabTypeDynamic />
<cfset VARIABELS.MyTabControl.TabSelected = DefaultTab />
<cfset VARIABELS.MyTabControl.ControlImagePath = "../tabcontrol/" />
<cfset VARIABELS.MyTabControl.ControlScriptPath = "../tabcontrol/" />

<cfreturn THIS />
</cffunction>

</cfcomponent>


.......................
Ben Nadel 
Web Developer
Nylon Technology
6 West 14th Street
New York, NY 10011
212.691.1134
212.691.3477 fax
www.nylontechnology.com

"Vote for Pedro"

-----Original Message-----
From: Robert Everland III [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 01, 2005 12:15 PM
To: CF-Talk
Subject: Converting ASP class to CFC

I have a couple questions about doing this. 

How would I emulate this behavior?

Set MyTabControl = New TabControl
MyTabControl.TabType = TabTypeDynamic
MyTabControl.TabSelected = DefaultTab
MyTabControl.ControlImagePath = "../tabcontrol/"
MyTabControl.ControlScriptPath = "../tabcontrol/"

I am thinking I would need to have an init() function because I don't think
a cfc can be created like that. I have this. variables in my cfc so should I
be able to do MyTabControl.whatever as long as there is a this in the
cfcomponent?




Bob



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225840
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to