|
To my knowledge those attributes must be hardcoded. There is
no dynamic evaluation of them…I am pretty sure anyway.
-----Original Message----- We are busily designing objects to implement in a
current application. (Thanks, Matt, et al for the introduction to OOP in CF). One of the things we wanted to do was to dynamically
evaluate the path to the objects. (All other pathing in the
application is evaluated dynamically). This works fine when
instantiating: <cfset
portalParamsDAO = CreateObject("component",
"#request.portalObjectPath#.dataObjects.PortalParamsDAO").init(variables.dns)> But when defining the function, CF seems to only want
a literal when the ReturnType is a component name. This fails with
message of "The
value of the attribute RETURNTYPE is invalid.": <cffunction
name="init" access="public"
output="false" returntype="#request.portalObjectPath#.dataObjects.PortalParamsDAO"
hint="Constructor for this CFC"> Instantiating works if we define the function like: <cffunction
name="init" access="public"
output="false" returntype="com.ipaper.timber.portal.dataObjects.PortalParamsDAO"
hint="Constructor for this CFC"> We have tried evaluate() and all kinds of formatting
of the syntax, but can't get past this. Anyone know how to make this
work, or can confirm that you have to use the literal in the ReturnType? Thanks, Mike |
- Dynamic evaluation of ReturnType Mike Ferris
- RE: Dynamic evaluation of ReturnType Dan Blackman
- RE: Dynamic evaluation of ReturnType Ken Ferguson
- Re: Dynamic evaluation of ReturnType Mike Ferris
- RE: Dynamic evaluation of ReturnType Daniel Elmore
- RE: Dynamic evaluation of ReturnType Daniel Elmore
- Re: Dynamic evaluation of ReturnType Mike Ferris
