Ask a Question related to Coldfusion Component Development, Design and Development.
-
Bjarte #1
Appending functions to an object
I want to extend an object with multiple cfc (with extends="" I can
only do one).
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>
Bjarte Guest
-
Appending to a string?
How the heck do you append to a string doing something like this... if it is defined append a "|" and then the var to the end of a string <cfif... -
attachMovie and object functions
I'm having problems with calling functions inside an instance of a movie clip that has JUST been added using 'attachMovie' command It appears... -
Appending at various locations.
I have to ask the user to input any two digits e.g input= 3,5 (their value can be upto 300-whole numbers only). These two numbers have to be... -
Appending at various locations
I have to ask the user to input any two digits e.g input= 3,5 (their value can be upto 300-whole numbers only). These two numbers have to be... -
#10743 [Com]: class functions & PHP core functions inconsistently clash ;)
ID: 10743 Comment by: destes at ix dot netcom dot com Reported By: jjones at net-conex dot com Status: Open...



Reply With Quote

