> From: Taco Fleur [mailto:[EMAIL PROTECTED] > > The first problem is that in the Java world the constructor > is declared as > private so you can't create an instance of the class. You > can't do that in > CF. > > Exactly, I have been thinking about that, how about the following? > > <cfcomponent> > > <cfset main() /> > > <cffunction > name="main" > access="private" > returntype="string" > output="true"> > </cffunction> > > <cffunction > name="init" > access="public" > returntype="any" > output="true"> > <cfreturn this /> > </cffunction> > > </cfcomponent>
Calling methods in the "constructor" area of a component could lead to undesired results... As in the CFC being called from the URL as a webservice.. Your main() would always fire off.. Just a heads up. Mike ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189209 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

