This works...
obj= createObject("component","cfc.MyClass");
obj.init(application.id);
obj.executeMethod();
But this does not?
obj= createObject("component","cfc.MyClass").init(application.id);
obj.execute();
on cfc...
<cfcomponent>
<cffunction name="init" access="public">
<cfargument name="id" required="true">
<cfscript>
this.id = arguments.id;
</cfscript>
</cffunction>
<cffunction name="execute" access="public">
<cfreturn true/>
</cffunction>
</cfcomponent>
I swear I've chained init with arguments before... I've even seen other code
samples that do it. CFMX8.0.1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336345
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm