For that I have created a private function _inject(), that exends my
original component with the functions from new components. This works
when I tested it in cf8, but all the function names became uppercase.
So is there a structInsert() like function that works with objects, or
any java functionality that can help me with this?
<cfcomponent>
<cffunction name="init" type="myfirstcomponent">
<cfset _inject('mysecondcomponent')>
<cfset _inject('mythirdcomponent')>
<cfreturn this>
</cffunction>
<cffunction name="_inject">
<cfargument name="obj" type="string">
<cfset var tmp = CreateObject('component",arguments.obj)>
<cfset var itm = "">
<cfloop collection="#tmp#" item="itm">
<cfset 'this.#itm#" = tmp[itm]>
</cfloop>
</cffunction>
</cfcomponent>