|
Calling Component methods in one function call |
Sometimes I want to return a data object from a specific method within a cfc, but in one hit. Why code an object creator, then a call to a method in that object, when you can do it in one go.
In the code above I am creating a variable "variables.myFuseBox". This becomes the return data from the object "myFuseBox" which is invoked with the createObject command. I am then passing the ".init" command to reference the "init" method in the CFC.
Lastly I'm passing in a list of arguments to the init method in the standard way.
There are no comments for this entry.
[Add Comment] [Subscribe to Comments]