> That would be cool except for sometimes the init() function 
> needs to be called after some assignments. Consider the 
> following example
> 
> <cfset server.myVar = createObject("component","foo")/>
> <cfset server.thing = handleToSomething>
> <cfset server.startupip = "192.168.1.11">
> <cfset server.init()/>
> 
> if "thing" and "startupip" had resources that the object 
> needed, and the init() was called without those being 
> assigned, the object could blowup.

There's no reason those properties couldn't be set in the constructor
function. That's how most languages would handle this issue. I wouldn't mind
seeing some sort of actual constructor function added to the CFC
architecture, instead of just using the "soft" constructor which simply
consists of stuff not wrapped within CFFUNCTION tags.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Reply via email to