Passing a cfc object to another cfc
Hi,
I am relatively new to using cfc, so I am not sure if what I am asking for is possible:
Can I pass a CFC object (that has been instantiated) to another CFC? For example, I instantiate a CFC object
<cfobject component="CFC1" name="myCFC1Obj">
<cfset myCFC1Obj.init('abc')>
Now I want to instantiate a second CFC object
<cfobject component="CFC2" name="myCFC2Obj">
I would like the functions in myCFC2Obj to have access to myCFC1Obj variables
and functions, either by passing myCFC1Obj as a function argument or by
using myCFC1Obj to instantiate myCFC2Obj.
I have read http://forums.adobe.com/message/1894989#1894989, but this
deals with instantiating CFC1 object inside CFC2. What I want is to instantiate
CFC1 object outside and pass it to CFC2.
Would I be able to do this?
Thank you.
